A map construction method and device, electronic equipment and storage medium

CN118960716BActive Publication Date: 2026-10-09CHENGDU CELIS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410984881.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2026-10-09
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

[0004]然而,目前的端到端在线矢量地图构建方法,虽然可以有效解决地图元素的建模和匹配问题,精度也出现了很大的提高,但波动仍然很大,在线实时构建的地图精度不高,例如地图要素的位置不准确

Benefits of technology

[0023] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the map construction method of the first aspect of the present invention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118960716B_ABST
    Figure CN118960716B_ABST
Patent Text Reader

Abstract

The application provides a map construction method and device, electronic equipment and storage medium, and relates to the online map construction technical field. The method comprises the following steps: acquiring the pose of a self car in a first coordinate system at a current moment and a local map in the first coordinate system at a previous moment; acquiring a detection map in a second coordinate system at the current moment; converting the detection map in the second coordinate system to obtain a detection map in the first coordinate system at the current moment according to the pose of the self car at the current moment; matching the detection map at the current moment with the local map at the previous moment in the first coordinate system, correcting the pose of the self car at the current moment, and obtaining an updated detection map at the current moment, and then matching the updated detection map at the current moment with the local map at the previous moment, and updating the positions of map elements in the local map at the previous moment according to a second matching result, so that the local map is optimized at each moment, the precise construction of an online map is realized, and the precision of the online map constructed in real time is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application was filed on April 24, 2024, with application number 202410496267.8, and the invention title of the original application was: A map construction method, apparatus, electronic device, and storage medium. Technical Field

[0002] This invention relates to the field of online map building technology, and in particular to a map building method, apparatus, electronic device, and storage medium. Background Technology

[0003] Currently, autonomous driving lane-level map construction and positioning technology is about enabling mass-produced autonomous vehicles to transmit maps and locate themselves on drivable roads with high precision and stability. This technology mainly involves the following aspects: offline high-precision maps, crowdsourced maps, online maps, etc.

[0004] However, while current end-to-end online vector map construction methods can effectively solve the modeling and matching problems of map elements and have significantly improved accuracy, significant fluctuations still exist, resulting in low accuracy of maps built online in real time, such as inaccurate location of map features. Therefore, how to improve the accuracy of online maps built in real time is a technical problem that this invention urgently needs to solve. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a map building method, apparatus, electronic device, and storage medium to improve the accuracy of online maps built in real time.

[0006] The first aspect of this invention provides a map construction method, the method comprising:

[0007] The system obtains the current pose of the vehicle in the first coordinate system and the local map in the first coordinate system at the previous moment; wherein, in this invention, "vehicle" means: the current vehicle;

[0008] Based on the sensor data at the current moment, obtain the detection map in the second coordinate system at the current moment;

[0009] Based on the vehicle's pose in the first coordinate system at the current moment, the detection map in the second coordinate system at the current moment is transformed into the first coordinate system to obtain the detection map in the first coordinate system at the current moment.

[0010] The detection map in the first coordinate system at the current time is matched with the local map in the first coordinate system at the previous time to obtain the first matching result;

[0011] Based on the first matching result, the pose of the vehicle in the first coordinate system at the current moment is corrected to obtain the updated pose of the vehicle in the first coordinate system at the current moment.

[0012] Based on the updated pose of the vehicle in the first coordinate system at the current moment, the updated detection map in the first coordinate system at the current moment is obtained, and then matched with the local map in the first coordinate system at the previous moment to obtain the second matching result.

[0013] Based on the second matching result, update the position of map elements in the local map under the first coordinate system at the previous moment.

[0014] A second aspect of the present invention provides a map building apparatus, the apparatus comprising:

[0015] The acquisition module is used to acquire the current pose of the vehicle in the first coordinate system, and to acquire the local map in the first coordinate system at the previous moment;

[0016] The detection module is used to obtain the detection map in the second coordinate system at the current moment based on the sensor data at the current moment;

[0017] The conversion module is used to convert the detection map in the second coordinate system at the current time to the first coordinate system based on the vehicle's pose in the first coordinate system at the current time, so as to obtain the detection map in the first coordinate system at the current time.

[0018] The first matching module is used to match the detected map in the first coordinate system at the current time with the local map in the first coordinate system at the previous time to obtain the first matching result;

[0019] The pose update module is used to correct the pose of the vehicle in the first coordinate system at the current moment according to the first matching result, so as to obtain the updated pose of the vehicle in the first coordinate system at the current moment.

[0020] The second matching module is used to obtain the updated detection map in the first coordinate system at the current time based on the updated pose of the vehicle in the first coordinate system at the current time, and then match it with the local map in the first coordinate system at the previous time to obtain the second matching result.

[0021] The map update module is used to update the position of map elements in the local map under the first coordinate system at the previous moment based on the second matching result.

[0022] A third aspect of the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the map construction method of the first aspect of the present invention.

[0023] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the map construction method of the first aspect of the present invention.

[0024] The map construction method of this invention acquires the vehicle pose and detection map at each moment in real time, as well as the local map at the previous moment. After transforming the detection map at the current moment to the same coordinate system based on the vehicle pose, the detection map at the current moment in the same coordinate system is matched with the local map at the previous moment for the first time, thereby optimizing the vehicle pose based on the first matching result. Then, based on the optimized vehicle pose, the detection map is transformed back to the same coordinate system, and the updated detection map is matched with the local map for the second time. The local map is updated based on the second matching result, thereby optimizing the local map at each moment, realizing accurate construction of the online map, and improving the accuracy of the real-time constructed online map. Attached Figure Description

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

[0026] Figure 1 This is a flowchart illustrating a map construction method according to an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram of the residual calculation process in map feature matching according to an embodiment of the present invention;

[0028] Figure 3 This is a topology optimization model diagram provided in an embodiment of the present invention;

[0029] Figure 4 This is a simplified schematic diagram of a graph optimization matching model between map features provided in an embodiment of the present invention;

[0030] Figure 5 This is a schematic flowchart illustrating a map construction and positioning method according to an embodiment of the present invention;

[0031] Figure 6 This is a structural block diagram of a map building device provided in an embodiment of the present invention;

[0032] Figure 7 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

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

[0034] Reference Figure 1 , Figure 1 This is a flowchart illustrating a map construction method according to an embodiment of the present invention.

[0035] like Figure 1 As shown, the method may include the following steps:

[0036] Step S11: Obtain the current pose of the vehicle in the first coordinate system, and obtain the local map in the first coordinate system at the previous moment.

[0037] In this embodiment, during vehicle driving, such as during autonomous driving, the vehicle's pose at each moment can be inferred in the first coordinate system based on the vehicle's real-time driving information to obtain the vehicle's pose at the current moment in the first coordinate system. Here, "vehicle" refers to the current vehicle, which can be an autonomous driving vehicle. In this embodiment, the vehicle can display the map constructed in this embodiment. The first coordinate system is a coordinate system based on the absolute position in the real physical world. The trajectory inference is calculated by using the vehicle's position at a certain moment, based on heading and speed information, to obtain the vehicle's current position information.

[0038] For example, in one embodiment, the current position of the vehicle in the first coordinate system can be determined by fusing the relative displacement (i.e., the vehicle's pose) using an IMU (Inertial Measurement Unit) and wheel speed sensors via Kalman filtering. First, the IMU can provide the vehicle's acceleration and angular velocity information at the current moment. By integrating the vehicle's acceleration and angular velocity information, the vehicle's velocity and displacement at the current moment can be obtained. Furthermore, the wheel speed sensors can directly measure the rotational speed of the vehicle's wheels. Using the wheel radius and rotational speed, the actual distance traveled by the vehicle at the current moment can be obtained.

[0039] However, because the integration process of the inertial measurement unit (IMU) accumulates errors, the displacement information obtained after long-term integration may have significant deviations. Furthermore, while wheel speed sensors are relatively accurate, their measurements can be affected by wheel slippage or tire wear. Therefore, in this embodiment, to comprehensively utilize the advantages of both the IMU and wheel speed sensors, a Kalman filter algorithm can be used for data fusion. The Kalman filter is a highly efficient recursive filter that can obtain the optimal state estimate by fusing multiple observations, even in the presence of uncertainty.

[0040] When calculating the pose of the vehicle, the velocity and displacement provided by the IMU can be used as the state variables of the Kalman filter, and the actual driving distance provided by the wheel speed sensor can be used as the observation value. Through the recursive process of the Kalman filter, the pose of the vehicle in the first coordinate system at the current moment, which combines the information from the IMU and the wheel speed sensor, can be obtained.

[0041] Assuming the current time is t, the trajectory inference result at time t is: the vehicle's pose T in the first coordinate system at the current time. 1,t and the error δT of the vehicle 1,t ,in R is the rotation matrix, and t is the translation vector.

[0042] In this embodiment, the vehicle's pose can be determined by using high-frequency data from the IMU to provide continuous displacement information, and by using the wheel speed sensor's measurement values ​​to correct the IMU's integration error, thereby obtaining a more accurate vehicle pose.

[0043] Furthermore, in this embodiment, a local map in the first coordinate system at the previous time step is also acquired. This local map is constructed based on previously detected map features and can be considered a ground truth. The local map in the first coordinate system at the previous time step is an updated and optimized local map obtained from the detected map at the previous time step. The local map coordinate system is the first coordinate system. If the current time step is the first time step (i.e., the first frame), the local map can be initialized and obtained.

[0044] Step S12: Based on the sensor data at the current moment, obtain the detection map in the second coordinate system at the current moment.

[0045] In this embodiment, during the vehicle's operation, real-time map elements are extracted based on the sensor data at the current moment to obtain a detection map in the second coordinate system at the current moment. The second coordinate system can be the vehicle coordinate system, the device coordinate system, or the BEV spatial coordinate system.

[0046] Map feature detection is based on sensor data. For example, in some embodiments, an end-to-end online vector map model can be built, referencing maptr / maptrv2, using the BEV-transformer technology to complete lane line detection and map feature extraction. Simultaneously, multimodal data (such as camera images and LiDAR point clouds) can be integrated, and keypoint prediction in map features can be performed using a Transformer network structure. Here, keypoints in map features can refer to 2D keypoints or 3D keypoints.

[0047] Furthermore, attention modules can be used to model and generate topological connections between key points, further improving the accuracy and efficiency of map feature extraction. Some embodiments also incorporate temporal frames to enhance map feature extraction accuracy. It should be noted that the map features in this embodiment include, but are not limited to: lane center lines, lane lines, lane line types, lane markings, stop lines, sidewalks, and poles. Finally, a detection map is constructed based on the detected set of map feature instances (i.e., map features), where the detection map is an ordered set of key points, and each map feature is an ordered set of points.

[0048] In an optional example, assuming the current time is t, the result of the k-th keypoint in the j-th map feature instance detected at time t is: P in the second coordinate system. 2,j,k (x, y, 0), where, in this embodiment, a 2D keypoint is used as an example, (x, y, 0) refers to a 2D plane where the detection result is 0 on the z-axis. Furthermore, the error δP corresponding to the keypoint can be set based on the confidence level and the distance from the vehicle. 2,j (The higher the confidence level s, the smaller the error; the greater the distance d from the vehicle, the greater the error.) For example: δP 2,j ~N(0,∑P 2,j ), ∑P 2,j = k(d / (s+1))+b, k=0.01, b=0.1; where s is the confidence level, d is the distance from the vehicle; k and b are the set empirical values, to conform to the principle that the larger the confidence level s, the smaller the error; and the larger the distance d from the vehicle, the larger the error.

[0049] Furthermore, this embodiment can perform a straight line judgment on three consecutive key points detected. When the distance between the middle key point and the line segment between the previous and next key points is less than a preset threshold, the middle point is deleted, and a map element with the middle point removed is obtained. A detection map is constructed, thereby deleting points that are close to a straight line to reduce the number of key points and reduce the amount of computation in the subsequent optimization process.

[0050] Step S13: Based on the vehicle's pose in the first coordinate system at the current moment, transform the detection map in the second coordinate system at the current moment to the first coordinate system to obtain the detection map in the first coordinate system at the current moment.

[0051] In this embodiment, since the detection map is in the second coordinate system, it is necessary to transform the detection map in the second coordinate system to the first coordinate system before matching the detection map with the local map. Specifically, based on the vehicle's pose in the first coordinate system at the current moment, the detection map in the second coordinate system at the current moment can be transformed to the first coordinate system to obtain the detection map in the first coordinate system at the current moment.

[0052] For example, the current time is t, and the pose of the k-th keypoint in the i-th map feature instance at time t in the first coordinate system is P. 1,j,k,t With error δP 1,j,k,t Then, based on the vehicle's pose in the first coordinate system at time t, 1,t and the error δt of the vehicle 1,t The conversion process can be referenced using the following formula:

[0053]

[0054] Among them, R 1,t Let R be the rotation matrix, and δR be R. 1,t The error, θ is the rotation matrix R 1,t The Lie algebra, δθ is the error of θ, δR = exp(δθ), R 1,t There is a one-to-one correspondence between θ and δθ, and also between δR and P. 2,j,k δP 2,j,k Let be the pose and error of the k-th keypoint in the j-th map feature instance in the second coordinate system. For P 2,j,k The antisymmetric matrix; the error in detecting key points of map features in the map in the first coordinate system is δP. 1,j,k,t ~N(0,∑P 1,j,k,t ), Where T is the transpose.

[0055] Step S14: Match the detection map in the first coordinate system at the current time with the local map in the first coordinate system at the previous time to obtain the first matching result.

[0056] In this embodiment, after obtaining the detection map in the first coordinate system at the current time, the detection map in the first coordinate system at the current time can be matched with the local map in the first coordinate system at the previous time to obtain the first matching result.

[0057] Step S15: Based on the first matching result, correct the pose of the vehicle in the first coordinate system at the current moment to obtain the updated pose of the vehicle in the first coordinate system at the current moment.

[0058] In this embodiment, the pose of the vehicle in the first coordinate system at the current moment can be corrected based on the first matching result obtained from the first matching, so as to obtain the updated pose of the vehicle in the first coordinate system at the current moment.

[0059] Step S16: Based on the updated pose of the vehicle in the first coordinate system at the current moment, obtain the updated detection map in the first coordinate system at the current moment, and then match it with the local map in the first coordinate system at the previous moment to obtain the second matching result.

[0060] In this embodiment, after obtaining the updated pose of the vehicle in the first coordinate system at the current moment, the detection map in the second coordinate system at the current moment can be converted back to the first coordinate system based on the updated pose of the vehicle in the first coordinate system at the current moment, so as to obtain the updated detection map in the first coordinate system at the current moment.

[0061] After obtaining the updated detection map in the first coordinate system at the current time, the updated detection map in the first coordinate system at the current time can be matched a second time with the local map in the first coordinate system at the previous time to obtain the second matching result. In this step, the method of re-conversion is the same as or similar to the method in step S13 above, and the method of the second matching is the same as or similar to the method of the first matching, which will not be described again.

[0062] Step S17: Based on the second matching result, update the position of map elements in the local map under the first coordinate system at the previous moment.

[0063] In this embodiment, after obtaining the second matching result, the positions of map elements in the local map under the first coordinate system at the previous moment can be updated based on the second matching result to generate the local map under the first coordinate system at the current moment, thereby completing the update of the local map and realizing real-time online map construction. Furthermore, the local map under the first coordinate system at the current moment can be used for map construction at the next moment.

[0064] In this embodiment, the vehicle's pose and detection map are acquired in real time at each moment, along with the local map from the previous moment. After transforming the detection map at the current moment to the same coordinate system based on the vehicle's pose, the detection map at the current moment in the same coordinate system is matched with the local map from the previous moment for the first time, thereby optimizing the vehicle's pose based on the first matching result. Then, based on the optimized vehicle pose, the detection map is transformed back to the same coordinate system, and the updated detection map is matched with the local map for the second time. The local map is updated based on the second matching result, so that the local map is optimized at each moment, achieving accurate construction of the online map and improving the accuracy of the online map constructed in real time. This integrates the previous and subsequent perception results (detection results) with other sensor odometers, improving the accuracy of the constructed map and vehicle positioning (vehicle pose), and thus improving the accuracy of decision-making and planning in the intelligent driving system.

[0065] In conjunction with the above embodiments, in one implementation, the present invention also provides a map construction method. In this method, step S14 may specifically include step S21, and step S15 may specifically include step S22:

[0066] Step S21: Match the map features in the detected map under the first coordinate system at the current time with the map features in the local map under the first coordinate system at the previous time to obtain the first matching result.

[0067] In this embodiment, the first matching can be performed by matching map features in the detection map under the first coordinate system at the current time with map features in the local map under the first coordinate system at the previous time to obtain the first matching result. It can be understood that the purpose of the matching is to match map features of the same type in the detection map with map features in the local map one by one, filtering out as many missed detections and false detections as possible. In this embodiment, each map feature in the detection map can be matched with each map feature in the local map to obtain the first matching result.

[0068] The first matching result includes at least: the first matched map feature and the residual corresponding to the first matched map feature. Furthermore, in this embodiment, the method for the second matching is the same as or similar to the method for the first matching.

[0069] Step S22: With the goal of minimizing the residual corresponding to the first matched map element, correct the pose of the vehicle in the first coordinate system at the current moment to obtain the updated pose of the vehicle in the first coordinate system at the current moment.

[0070] In this embodiment, after obtaining the first matching map element and the residual corresponding to the first matching map element, when updating the vehicle pose, the vehicle pose at the current moment can be corrected in the first coordinate system with the goal of minimizing the residual corresponding to the first matching map element, so as to obtain the updated pose of the vehicle in the first coordinate system at the current moment.

[0071] For example, the residual corresponding to the first matched map element can be made as small as possible. When the residual reaches a certain value (a pre-set residual threshold), the position of the vehicle is the updated pose of the vehicle in the first coordinate system at the current moment.

[0072] In an optional example, it could be calculating a ray from the current keypoint to the next keypoint in a map feature of a local map, where the keypoint is located at point P. 1,j,k,t-1 The error is δP 1,j,k,t-1 The direction vector is l and the error is δl. The error δl can be calculated using an error propagation model in three-dimensional space. This allows us to calculate the ray distance d from the nearest keypoint to the map feature being detected, as well as the error δd, and correct the pose to make ∑ j=0 ∑ k=0 weight*d j,k Minimum, where j is a map feature, k is a key point, and d j,k denoted as the ray distance from the k-th keypoint to the nearest keypoint in the j-th map feature instance, and weight as the weight value, which is influenced by δd. You can refer to the observation model in plane uncertainty estimation and Iekf pose estimation in Voxelmap.

[0073] In conjunction with the above embodiments, in one implementation, the present invention also provides a map construction method, wherein the method further includes step S31 before step S21, and step S21 may specifically include step S32:

[0074] Step S31: Remove map elements in the local map under the first coordinate system at the previous moment whose first probability is less than the first threshold, and obtain the remaining map elements.

[0075] In this embodiment, each map element in the local map corresponds to a first probability, which represents the probability that the map element in the local map actually exists. Since this embodiment uses trajectory inference to predict the vehicle's pose, the position difference between the detected map and the local map will not be too large. Therefore, map elements with a first probability less than a first threshold can be removed from the local map in the first coordinate system at the previous time step, resulting in the remaining map elements in the local map in the first coordinate system at the previous time step. The first threshold in this embodiment is a threshold that can be freely set according to needs or experience, and there are no restrictions on the value of the first threshold.

[0076] Step S32: Match the map elements in the detected map under the first coordinate system at the current time with the remaining map elements to obtain the first matching result.

[0077] In this embodiment, when matching the local map with the detection map, the map features in the detection map under the first coordinate system at the current time are matched with the remaining map features in the local map under the first coordinate system at the previous time to obtain a first matching result. Similarly, in this embodiment, the second matching is performed by matching the map features in the updated detection map under the first coordinate system at the current time with the remaining map features to obtain a second matching result.

[0078] In conjunction with the above embodiments, the present invention also provides a map construction method, which, in addition to the steps described above, may further include steps S41 to S43:

[0079] Step S41: Based on the residual corresponding to the second matching map element, increase the first probability corresponding to the second matching map element in the local map.

[0080] In this embodiment, each map element in the local map corresponds to a first probability, which represents the probability that the map element in the local map actually exists. The second matching result in this embodiment includes: the matching second-matching map element and the residual corresponding to the matching second-matching map element, the map elements in the local map that do not match, and the map elements in the detection map that do not match. Specifically, a map element in the local map that does not match indicates that the map element is in the local map but does not match any map element in the detection map; a map element in the detection map that does not match indicates that the map element is in the detection map but does not match any map element in the local map.

[0081] It is understood that the first matching result in this embodiment includes, in addition to the matched first map features and the residuals corresponding to the first matched map features, also the map features that did not match in the first matching of the local map, and the map features that did not match in the first matching of the detection map. This embodiment performs two matches, and in addition to the successfully matched map features and the residuals corresponding to the matched map features, it also includes the unmatched map features that did not match in the local map, and the map features that did not match in the detection map. The map features that did not match in the local map and the map features that did not match in the detection map obtained from the two matches can be the same or different, depending on the actual matching situation.

[0082] In this embodiment, after obtaining the second matching result, the first probability corresponding to the second matching map element in the local map under the first coordinate system at the previous time step can be increased based on the residual corresponding to the second matching map element in the second matching result. For example, a probability can be calculated based on the magnitude of the residual corresponding to the second matching map element, and the calculated probability can be added to the previously corresponding first probability, thereby increasing the first probability corresponding to the second matching map element, with a larger probability for a smaller residual; alternatively, the calculated probability can be directly used as the first probability corresponding to the second matching map element, thereby increasing the first probability corresponding to the second matching map element, with a larger probability for a smaller residual.

[0083] Step S42: Reduce the first probability corresponding to the local map that has no matching map feature in the local map.

[0084] In this embodiment, after determining the map features in the local map that have no matching in the second matching result, the first probability corresponding to the map features that have no matching in the local map in the first coordinate system at the previous time can be reduced.

[0085] Step S43: Add the map features that are not matched in the detected map to the local map, and initialize the first probability corresponding to the map features that are not matched in the detected map.

[0086] In this embodiment, for the map features in the second matching result that have no matching, the map features that have no matching can be added to the local map in the first coordinate system at the previous time, and the first probability corresponding to the newly added map features that have no matching can be initialized.

[0087] In this embodiment, based on the second matching result at the current moment, the first probability of each map element in the local map is updated for matching between map elements at the next moment.

[0088] In conjunction with the above embodiments, the present invention also provides a map construction method, in which step S21 may specifically include steps S51 to S56:

[0089] Step S51: Determine the second key point that is closest to the first key point in the first map feature of the detected map.

[0090] In this embodiment, the second key point closest to the first key point in the first map element of the detection map can be determined firstly. Specifically, the map element being matched in the detection map under the first coordinate system at the current moment is the first map element; the map element being matched in the local map under the first coordinate system at the previous moment is the second map element; the first map element and the second map element are two map elements being matched. The key point in the first map element is the first key point; the second key point is the key point in the second map element of the local map under the first coordinate system at the previous moment that is closest to the first key point.

[0091] Step S52: Determine the straight-line distance between the first key point and the second key point.

[0092] In this embodiment, after determining the second key point corresponding to the first key point, that is, after determining the second key point closest to the first key point, the straight-line distance D between the first key point and the second key point can be determined.

[0093] Step S53: Traverse all first keypoints in the first map element and obtain the straight-line distances corresponding to each first keypoint.

[0094] In this embodiment, the first map element contains multiple first keypoints. All first keypoints in the first map element can be traversed to determine the second keypoints corresponding to each of the first keypoints, thereby obtaining the straight-line distances corresponding to each of the first keypoints. Specifically, the straight-line distances corresponding to each of the first keypoints are the straight-line distances between each first keypoint and its corresponding second keypoint.

[0095] Step S54: Based on the straight-line distances corresponding to all the first key points, obtain the residuals between the first map element and the second map element.

[0096] In this embodiment, after obtaining the straight-line distances corresponding to all first keypoints in the first map feature, the residuals between the first map feature and the second map feature can be determined based on the straight-line distances corresponding to all first keypoints. In an optional example, the residuals between the first map feature and the second map feature can be obtained by averaging the straight-line distances corresponding to all first keypoints.

[0097] Step S55: Retain the matching relationship between the first map feature and the second map feature when the residual is less than the second threshold.

[0098] In this embodiment, a second threshold is preset, which can be arbitrarily set according to needs or experience, and there are no restrictions on it. When it is determined that the residual between the first map feature and the second map feature is less than the second threshold, the matching relationship between the first map feature and the second map feature can be retained.

[0099] Step S56: Remove redundant matching relationships from the matching relationships to obtain one-to-one matching map elements and the residuals corresponding to the one-to-one matching map elements.

[0100] In this embodiment, after preserving the matching relationship between the first map feature and the second map feature, since one first map feature may retain a matching relationship with multiple second map features, and one second map feature may retain a matching relationship with multiple first map features, this embodiment employs the Hungarian matching algorithm to remove redundant matching relationships from the preserved matching relationships, thereby obtaining one-to-one matching map features and the residuals corresponding to the one-to-one matching map features.

[0101] It is understandable that, in the first matching, the one-to-one matching map element and the corresponding residual of the one-to-one matching map element are: the residual of the first matching map element and the first matching map element; in the second matching, the one-to-one matching map element and the corresponding residual of the one-to-one matching map element are: the residual of the second matching map element and the second matching map element.

[0102] For example, in one embodiment, such as Figure 2 As shown, Figure 2 This is a schematic diagram illustrating the residual calculation process in map feature matching according to an embodiment of the present invention. Figure 2 In the diagram, the solid curve at the top represents map features in the detected map, while the dashed curve at the bottom represents map features in the local map. Points on the curves are ordered points among the map features, i.e., ordered key points among the map features. The line connecting the two curves represents the distance from the key point in the detected map features to the nearest line segment in the local map.

[0103] In conjunction with the above embodiments, the present invention also provides a map construction method, in which step S17 may specifically include steps S61 to S69:

[0104] Step S61: Based on the second matching result and the local map in the first coordinate system at the previous moment, determine the key points to be optimized.

[0105] In this embodiment, after determining the second matching result, the key points to be optimized can be determined based on the second matching result and the local map in the first coordinate system at the previous moment. The key points to be optimized are the key points in the map elements that need to be updated in location.

[0106] In this embodiment, in order to optimize the topological relationship between map features, it is also necessary to optimize the curve shape of each map feature itself. Since the key points of map features in the local map and the detection map are not matched one-to-one, and the intersection points of each map feature are fixed on a curve, it is a good choice to use the intersection points and the points in the matched map features as constraints on the topological relationship in the local map.

[0107] Step S62: Among the key points to be optimized, the first and last points of the map elements are determined as first-class points, and the first and last points of each map element are determined as first-class point pairs.

[0108] In this embodiment, the first and last points of map elements in the key points to be optimized can be identified as first-type points, and the first and last points of each map element can be identified as a first-type point pair. For example, taking a lane line as a map element, the first and last points of the map element are the two vertices of the lane line.

[0109] Step S63: Among the key points to be optimized, the key points whose head and tail points and intersection points of the map elements coincide are identified as the second type of points.

[0110] In this embodiment, the intersection points of each map element in the key points to be optimized can be determined first: traverse the head and tail points of all map elements, and search for the nearest point in other map elements within the distance threshold (an arbitrary threshold specified according to requirements or experience) for each head and tail point. It is possible to find the nearest point in multiple map elements, and the nearest point to the head and tail point among the nearest points in multiple map elements is regarded as the intersection point.

[0111] After identifying the intersection points, key points among the key points to be optimized whose beginning and end points of map features coincide with the intersection points can be identified as second-type points. For example, ... Figure 3 As shown, Figure 3 This is a topology optimization model diagram provided in an embodiment of the present invention. Figure 3 In the diagram, the dots on the top rectangle are the intersection points within the threshold of the head and tail points. The horizontal elliptical dots in the bottom row are the head and tail points. The vertical elliptical dots in the middle row and the vertical elliptical dots in the fifth column are the key points where the head and tail points coincide with the intersection points.

[0112] Step S64: Among the key points to be optimized, the intersection points within the third threshold of the head and tail points of the map element are identified as third-class points, and the intersection points of the third-class points and the corresponding head and tail points of the map element are identified as third-class point pairs.

[0113] In this embodiment, intersection points within a third threshold distance from the start and end points of map features among the key points to be optimized can be identified as third-type points. Simultaneously, the start and end points and intersection points form third-type point pairs. The third threshold can be arbitrarily set according to requirements or experience, and its specific value is not limited. In other words, intersection points within the third-type points and their corresponding start and end points of map features constitute third-type point pairs.

[0114] It should be noted that in this embodiment, the "point pair" in the first type of point pair and the third type of point pair refers to a pair of points, consisting of two points; wherein, the first type of point pair consists of the two head and tail points of each map element, and the third type of point pair consists of the intersection point of the third type of points and the head and tail points of the map element corresponding to the intersection point of the third type of points.

[0115] Step S65: Among the key points to be optimized, the key point closest to the vehicle in each map feature is identified as the fourth type of point.

[0116] In this embodiment, the key point closest to the vehicle in each map element among the key points to be optimized will be identified as the fourth type of point.

[0117] Step S66: Among the key points to be optimized, the key points other than the first type of points, the second type of points, the third type of points, and the fourth type of points are identified as the fifth type of points, and the fifth type of points in the same map feature are identified as the fifth type of point set.

[0118] In this embodiment, after determining the first type of points, the second type of points, the third type of points, and the fourth type of points, the key points other than the first type of points, the second type of points, the third type of points, and the fourth type of points can be determined as the fifth type of points; and the fifth type of points in the same map feature are determined as the fifth type of point set, and the fifth type of point set is a sequential set.

[0119] Step S67: Define the key points to be optimized as nodes in the graph optimization model, define the two key points in the first type of point pair as edges, define the two key points in the third type of point pair as edges, define the two adjacent key points in the fifth type of point set as edges, and establish prior edges for the nodes of the third type of points.

[0120] In this embodiment, a graph optimization model can be established, defining all key points (first type, second type, third type, fourth type, and fifth type) in the key points to be optimized as nodes in the graph optimization model, defining the two key points in the first type of point pair as edges, defining the two key points in the third type of point pair as edges, defining the two adjacent key points in the fifth type of point set as edges, and establishing prior edges for the nodes of the third type of points.

[0121] Step S68: The distance and direction of the two adjacent key points are taken as observations. The prior edge of the first node in front of the vehicle pose is taken as the position of the first node in the detection map at the current time. The prior edge of the second node behind the vehicle pose is taken as the position of the second node in the local map at the previous time. The key points to be optimized are processed by the graph optimization model to obtain the position and error of the optimized key points.

[0122] In this embodiment, the distance and direction between two adjacent key points can be used as observations. The matching second matching map elements include: a map element in the local map and a map element in the detection map. All key points of the map elements in the matching second matching map elements and the local map are defined as edges, and the distance from the key points in the matching second matching map elements and the map elements in the detection map to the nearest line segment is used as an observation. Based on the position and error of the two key points of the nearest line segment, the observation and error of the line segment length and direction are derived.

[0123] Furthermore, the prior edges of the first node in front of the vehicle pose are observed using the position of the first node in the detection map at the current time step, where the first node is the node in front of the vehicle pose in the detection map. The prior edges of the second node behind the vehicle pose are observed using the position of the second node in the local map at the previous time step, where the second node is the node behind the vehicle pose in the local map. It should be noted that the observations in this embodiment aim to keep the observed values ​​as unchanged as possible during the optimization process.

[0124] In this embodiment, after determining the nodes, edges, and observations, the key points to be optimized can be processed using a graph optimization model to obtain the position and error of the optimized key points, that is, to obtain the position and error of all nodes after optimization.

[0125] For example, such as Figure 4 As shown, Figure 4 This is a simplified schematic diagram of a graph optimization matching model between map features provided in an embodiment of the present invention. Figure 4 In the diagram, the dashed line connecting the largest dot represents the prior edge between the local map and the detection map. The other vertex of the ellipse connected by the prior edge represents the third type of point. The upper dashed rectangle represents map features in the local map, and the lower solid rectangle represents map features in the detection map. The points within the two rectangles represent ordered points (fifth type of points) in the map features. The lines connecting the fifth type of points represent the length and direction of the edges between the points. The short line between the two rectangles represents the edges between the map features.

[0126] Step S69: Based on the optimized key point positions and errors, update the positions of map elements in the local map under the first coordinate system at the previous time, and generate the local map under the first coordinate system at the current time.

[0127] In this embodiment, after obtaining the optimized key point positions and errors, the positions of map elements in the local map under the first coordinate system at the previous moment can be updated based on the optimized key point positions and errors to generate the local map under the first coordinate system at the current moment, thereby realizing the map construction at the current moment.

[0128] In an optional example, the location and error of all nodes can be obtained through optimization. The key points in the detection map are inserted between the two key points of the nearest line segment in the local map. Then, a straight line judgment is made by using three adjacent key points (same as or similar to the straight line judgment in step S12 above). The redundant key points in the middle are deleted to form a new set of key points. The local map in the first coordinate system at the current time is then constructed based on the new set of key points.

[0129] The map building method provided in this embodiment can be deployed on the vehicle-side for map-less intelligent driving, reducing costs; it can also be used for cloud-based crowdsourced map (vector map with map element probability and point error) construction, and the vehicle-side vector map matching and positioning method with errors can quickly promote L3 and above intelligent driving.

[0130] In conjunction with the above embodiments, the present invention also provides a map construction method, in which step S61 may specifically include steps S71 and S72:

[0131] Step S71: In the local map of the first coordinate system at the previous moment, the key points whose errors are greater than the fourth threshold are identified as the third key points.

[0132] In this embodiment, a threshold is determined for the error corresponding to the key point in the map element in the local map under the first coordinate system at the previous moment. The error corresponding to the key point in the local map is compared with a pre-set fourth threshold (which can be arbitrarily specified according to needs or experience). The key point whose error corresponding to the key point in the local map is greater than the fourth threshold is determined as the third key point.

[0133] Step S72: At least the key points of the map elements that have no matching in the second matching result and the third key point are identified as key points to be optimized.

[0134] In this embodiment, a map element that is not matched in the detection map is a map element that appears in the detection map but does not appear in the local map. It may be a newly detected map element. A map element that is not matched in the local map is a map element that appears in the local map but does not appear in the detection map. It may be a falsely detected map element. These are all map elements that have not been matched successfully and need to be further optimized.

[0135] Therefore, this embodiment may at least identify the key points of map elements that have no matching in the second matching result and the identified third key points as key points to be optimized; or it may identify the key points of map elements that have no matching in the second matching result, the key points of map elements that have no matching in the local map in the second matching result, and the identified third key points as key points to be optimized, so as to optimize the position of the key points to be optimized.

[0136] In this embodiment, key points with small errors are excluded from the key points to be optimized. It can be understood that small errors indicate that the key points are already quite accurate and do not need to be optimized. Therefore, in order to further save computing resources, key points with errors greater than a certain threshold, as well as key points in map elements that were not matched successfully before, are identified as key points to be optimized and their positions are optimized.

[0137] In one embodiment, such as Figure 5 As shown, Figure 5 This is a flowchart illustrating a map construction and positioning method according to an embodiment of the present invention. Figure 5 In the initial stage, after starting, a first coordinate system is established based on the vehicle's absolute position in the physical world. A vehicle state filter is then created, such as a Kalman filter for predicting and updating the vehicle's pose. For example, the IEKF Kalman filter can be used in the fusion localization algorithm of LiDAR and IMU.

[0138] Secondly, the vehicle pose transformation and error are obtained based on trajectory inference in the first coordinate system. It is assumed that the trajectory inference result at time t is the vehicle pose and error. Furthermore, map feature detection is performed in the second coordinate system at each time step, thus obtaining the map features of the detected map in the second coordinate system at time t. Here, the vehicle coordinate system, device coordinate system, or BEV space are collectively referred to as the second coordinate system. Initially, the transformation matrix between the first and second coordinate systems is T. 1,t And, when time t is the first frame, the local map is initialized.

[0139] Then, based on the vehicle pose and error inferred from the trajectory at time t, coordinate transformation is performed on the map elements in the detected map in the second coordinate system at time t to obtain the pose and error of the map elements in the detected map in the first coordinate system at time t.

[0140] Next, based on the pose and error of the map features in the detected map at time t in the first coordinate system, and the map features in the local map updated at time t-1, the Hungarian algorithm is used for matching detection to determine the first matching result between the map features of the detected map and the map features of the local map.

[0141] Finally, for the pose residuals of the successfully matched map features in the first matching result, the vehicle state filter is optimized and updated to obtain the optimized pose and error of the vehicle. Based on the optimized pose and error of the vehicle, the pose and error of the map features detected in the second coordinate system at time t are re-transformed to update the pose and error of the map features detected in the first coordinate system at time t. Finally, based on the pose and error of the map features detected in the first coordinate system at time t, the local map features are re-matched. The local map at time t is updated based on the unmatched map features in the second matching result and the map features with large errors in the local map.

[0142] In this embodiment, map features in the current frame are detected, and Hungarian matching is performed between the map features in the currently detected map and the map features in the local map under the same coordinate system. The matched detected map features are used as observations of map features in the local map with a probability greater than a threshold. Odometry information from other sensors is fused to optimize vehicle positioning, thereby correcting the first probability of map features in the local map, as well as the location and error of key points. Unmatched detected map instances are added to the local map for management, forming a loop that eventually reaches a convergence state.

[0143] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0144] Based on the same inventive concept, one embodiment of the present invention provides a map building apparatus 600. (See reference...) Figure 6 , Figure 6 This is a structural block diagram of a map building device provided in an embodiment of the present invention. For example... Figure 6 As shown, the device 600 includes:

[0145] The acquisition module 601 is used to acquire the current pose of the vehicle in the first coordinate system, and to acquire the local map in the first coordinate system at the previous moment.

[0146] The detection module 602 is used to obtain the detection map in the second coordinate system at the current time based on the sensor data at the current time.

[0147] The conversion module 603 is used to convert the detection map in the second coordinate system at the current time to the first coordinate system according to the pose of the vehicle in the first coordinate system at the current time, so as to obtain the detection map in the first coordinate system at the current time.

[0148] The first matching module 604 is used to match the detection map in the first coordinate system at the current time with the local map in the first coordinate system at the previous time to obtain a first matching result;

[0149] The pose update module 605 is used to correct the pose of the vehicle in the first coordinate system at the current moment according to the first matching result, so as to obtain the updated pose of the vehicle in the first coordinate system at the current moment.

[0150] The second matching module 606 is used to obtain the updated detection map in the first coordinate system at the current time based on the updated pose of the vehicle in the first coordinate system at the current time, and then match it with the local map in the first coordinate system at the previous time to obtain the second matching result.

[0151] The map update module 607 is used to update the position of map elements in the local map under the first coordinate system at the previous moment according to the second matching result.

[0152] Optionally, the first matching module 604 includes:

[0153] The first matching submodule is used to match map features in the detected map under the first coordinate system at the current time with map features in the local map under the first coordinate system at the previous time to obtain the first matching result; the first matching result includes at least: the first matching map feature that matches and the residual corresponding to the first matching map feature;

[0154] The pose update module 605 includes:

[0155] The pose update submodule is used to correct the pose of the vehicle in the first coordinate system at the current time with the goal of minimizing the residual corresponding to the first matched map element, so as to obtain the updated pose of the vehicle in the first coordinate system at the current time.

[0156] Optionally, the map features in the local map correspond to a first probability, the first probability representing the probability that the map features in the local map actually exist; the device 600 further includes:

[0157] The elimination module is used to eliminate map elements in the local map of the first coordinate system at the current time that have a first probability less than a first threshold before matching the map elements in the detection map of the first coordinate system at the previous time with the map elements in the local map of the first coordinate system at the previous time to obtain the first matching result, so as to obtain the remaining map elements.

[0158] The first matching submodule includes:

[0159] The map feature matching submodule is used to match the map features in the detected map in the first coordinate system at the current time with the remaining map features to obtain the first matching result.

[0160] Optionally, the map elements in the local map correspond to a first probability, which represents the probability that the map elements in the local map actually exist; the second matching result includes: a matching second-matching map element and the residual corresponding to the second-matching map element, map elements in the local map that do not match, and map elements in the detection map that do not match; the map elements in the local map that do not match represent that the map element is in the local map and does not match the map elements in the detection map; the map elements in the detection map that do not match represent that the map element is in the detection map and does not match the map elements in the local map;

[0161] The device 600 further includes:

[0162] The first probability update module is used to increase the first probability corresponding to the second matching map element in the local map based on the residual corresponding to the second matching map element;

[0163] The second probability update module is used to reduce the first probability corresponding to the map features in the local map that have no matching;

[0164] The third probability update module is used to add the map features that are detected as having no matching in the local map to the local map, and to initialize the first probability corresponding to the map features that are detected as having no matching.

[0165] Optionally, the first matching submodule includes:

[0166] The key point determination submodule is used to determine the second key point that is closest to the first key point in the first map feature of the detection map, and the second key point is in the second map feature of the local map; the first map feature and the second map feature are map features to be matched.

[0167] The straight-line distance determination submodule is used to determine the straight-line distance between the first key point and the second key point;

[0168] The traversal submodule is used to traverse all the first keypoints in the first map element and obtain the straight-line distances corresponding to each of the first keypoints.

[0169] The residual determination submodule is used to obtain the residual between the first map element and the second map element based on the straight-line distances corresponding to each of the first key points.

[0170] The relationship retention submodule is used to retain the matching relationship between the first map feature and the second map feature when the residual is less than the second threshold.

[0171] The elimination submodule is used to eliminate redundant matching relationships in the matching relationships to obtain one-to-one matching map elements and the residuals corresponding to the one-to-one matching map elements.

[0172] Optionally, the map update module 607 includes:

[0173] The optimization key point determination submodule is used to determine the key points to be optimized based on the second matching result and the local map in the first coordinate system at the previous moment;

[0174] The first type of point determination submodule is used to determine the first type of points among the key points to be optimized, the first and last points of map elements are determined as first type of points, and the first and last points of each map element are determined as first type of point pairs.

[0175] The second type of point determination submodule is used to determine the key points in the key points to be optimized, where the beginning and end points and intersection points of the map elements coincide, as the second type of points;

[0176] The third-category point determination submodule is used to determine the intersection points of the key points to be optimized that are within the third threshold of the head and tail points of the map element as third-category points, and to determine the intersection points of the third-category points and the corresponding head and tail points of the map element as third-category point pairs.

[0177] The fourth type of point determination submodule is used to determine the key point closest to the vehicle in each map feature among the key points to be optimized as the fourth type of point;

[0178] The fifth type of point determination submodule is used to determine the key points other than the first type of points, the second type of points, the third type of points and the fourth type of points among the key points to be optimized as fifth type points, and to determine the fifth type of points in the same map feature as the fifth type of point set;

[0179] The edge determination submodule is used to define the key points to be optimized as nodes in the graph optimization model, define the two key points in the first type of point pair as edges, define the two key points in the third type of point pair as edges, define the two adjacent key points in the fifth type of point set as edges, and establish prior edges for the nodes of the third type of points.

[0180] The observation determination submodule is used to take the distance and direction of two adjacent key points as observations, the prior edge of the first node in front of the vehicle pose is taken as the position of the first node in the detection map at the current time as observations, and the prior edge of the second node behind the vehicle pose is taken as the position of the second node in the local map at the previous time as observations. The graph optimization model is used to process the key points to be optimized to obtain the position and error of the optimized key points.

[0181] The location update submodule is used to update the position of map elements in the local map under the first coordinate system at the previous time based on the position and error of the optimized key points, and generate the local map under the first coordinate system at the current time.

[0182] Optionally, the optimization key point determination submodule includes:

[0183] The third key point determination submodule is used to determine the key points in the local map of the first coordinate system at the previous moment, whose errors are greater than the fourth threshold, as the third key points.

[0184] The key point determination submodule is used to determine at least the key points of map elements that have no matching in the second matching result and the third key point as key points to be optimized.

[0185] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the map construction method as described in any of the above embodiments of the present invention.

[0186] Based on the same inventive concept, another embodiment of the present invention provides an electronic device 700, such as... Figure 7 As shown. Figure 7This is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device includes a memory 702, a processor 701, and a computer program stored in the memory and executable on the processor. When executed by the processor, the program implements the steps in the map construction method described in any of the above embodiments of the present invention.

[0187] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0188] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0189] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0190] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0191] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0193] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the present invention.

[0194] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0195] The above provides a detailed description of the map construction method, apparatus, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A map construction method, characterized in that, The method includes: Obtain the current pose of the vehicle in the first coordinate system, and obtain the local map in the first coordinate system at the previous moment; Based on the sensor data at the current moment, obtain the detection map in the second coordinate system at the current moment; Based on the vehicle's pose in the first coordinate system at the current moment, the detection map in the second coordinate system at the current moment is transformed into the first coordinate system to obtain the detection map in the first coordinate system at the current moment. The detection map in the first coordinate system at the current time is matched with the local map in the first coordinate system at the previous time to obtain the first matching result; Based on the first matching result, the pose of the vehicle in the first coordinate system at the current moment is corrected to obtain the updated pose of the vehicle in the first coordinate system at the current moment. Based on the updated pose of the vehicle in the first coordinate system at the current moment, the updated detection map in the first coordinate system at the current moment is obtained, and then matched with the local map in the first coordinate system at the previous moment to obtain the second matching result. Based on the second matching result and the local map in the first coordinate system at the previous moment, the key points to be optimized are determined, and the key points to be optimized are defined as nodes in the graph optimization model. At least the distance and direction of two adjacent key points are observed. The key points to be optimized are processed through the graph optimization model to obtain the position and error of the optimized key points. Based on the optimized key point positions and errors, update the positions of map elements in the local map of the first coordinate system at the previous time step. The key points to be optimized include at least: third type points; the third type points are the intersection points of the key points to be optimized that are within the third threshold of the head and tail points of the map element.

2. The map construction method according to claim 1, characterized in that, The detection map in the first coordinate system at the current time is matched with the local map in the first coordinate system at the previous time to obtain a first matching result, including: The map features in the detected map under the first coordinate system at the current time are matched with the map features in the local map under the first coordinate system at the previous time to obtain the first matching result; the first matching result includes at least: the first matching map feature that matches and the residual corresponding to the first matching map feature. Based on the first matching result, the vehicle's pose in the first coordinate system at the current moment is corrected to obtain the updated pose of the vehicle in the first coordinate system at the current moment, including: With the goal of minimizing the residual corresponding to the first matched map element, the pose of the vehicle at the current moment in the first coordinate system is corrected to obtain the updated pose of the vehicle at the current moment in the first coordinate system.

3. The map construction method according to claim 1, characterized in that, The map elements in the local map are associated with a first probability, which represents the probability that the map elements in the local map actually exist; the second matching result includes: a matching second map element and the residual corresponding to the matching second map element, map elements in the local map that do not match, and map elements in the detection map that do not match; the map elements in the local map that do not match represent that the map element is in the local map and does not match any map elements in the detection map; the map elements in the detection map that do not match represent that the map element is in the detection map and does not match any map elements in the local map. The method further includes: Based on the residual corresponding to the second matched map element, increase the first probability corresponding to the second matched map element in the local map; Reduce the first probability corresponding to the local map that has no matching map feature in the local map; Add the map features that are not matched in the detected map to the local map, and initialize the first probability corresponding to the map features that are not matched in the detected map.

4. The map construction method according to claim 2, characterized in that, The map features in the detected map under the first coordinate system at the current time are matched with the map features in the local map under the first coordinate system at the previous time to obtain the first matching result, including: Determine the second key point that is closest to the first key point in the first map feature of the detection map, the second key point being in the second map feature of the local map; the first map feature and the second map feature are map features to be matched; Determine the straight-line distance between the first key point and the second key point; Traverse all the first keypoints in the first map element to obtain the straight-line distances corresponding to each first keypoint. Based on the straight-line distances corresponding to each of the first key points, the residuals between the first map element and the second map element are obtained. The matching relationship between the first map feature and the second map feature is retained when the residual is less than the second threshold. Redundant matching relationships are removed from the matching relationships to obtain one-to-one matching map elements, and the residuals corresponding to the one-to-one matching map elements.

5. The map construction method according to claim 1, characterized in that, The method further includes: Among the key points to be optimized, the first and last points of map elements are identified as first-class points, and the first and last points of each map element are identified as first-class point pairs. Among the key points to be optimized, the key points where the beginning, end, and intersection points of the map elements coincide are identified as the second type of points; Among the key points to be optimized, the intersection points within the third threshold of the head and tail points of the map element are determined as the third type of points, and the intersection points of the third type of points and the corresponding head and tail points of the map element are determined as third type of point pairs. Among the key points to be optimized, the key point closest to the vehicle in each map element is identified as the fourth type of point; Among the key points to be optimized, the key points other than the first type of points, the second type of points, the third type of points, and the fourth type of points are identified as the fifth type of points, and the fifth type of points that are in the same map feature are identified as the fifth type of point set; Define the two key points in the first type of point pair as edges, define the two key points in the third type of point pair as edges, define the two adjacent key points in the fifth type of point set as edges, and establish prior edges for the nodes of the third type of points. The step of using at least the distance and direction of two adjacent key points as observations, and processing the key points to be optimized using the graph optimization model to obtain the optimized key point's position and error, includes: using the distance and direction of two adjacent key points as observations; using the position of the first node in the detection map at the current moment as the prior edge of the first node in front of the vehicle pose; and using the position of the second node in the local map at the previous moment as the prior edge of the second node behind the vehicle pose; and processing the key points to be optimized using the graph optimization model to obtain the optimized key point's position and error. The step of updating the position of map features in the local map under the first coordinate system at the previous time step based on the optimized position and error of the key points includes: Based on the optimized key point positions and errors, the positions of map elements in the local map under the first coordinate system at the previous time are updated to generate the local map under the first coordinate system at the current time.

6. The map construction method according to claim 1, characterized in that, The step of determining the key points to be optimized based on the second matching result and the local map in the first coordinate system at the previous time includes: In the local map of the first coordinate system at the previous moment, the key points whose errors are greater than the fourth threshold are identified as the third key points. At least the key points of the map elements that have no matching in the second matching result and the third key point are identified as key points to be optimized.

7. A map building device, characterized in that, The device includes: The acquisition module is used to acquire the current pose of the vehicle in the first coordinate system, and to acquire the local map in the first coordinate system at the previous moment; The detection module is used to obtain the detection map in the second coordinate system at the current moment based on the sensor data at the current moment; The conversion module is used to convert the detection map in the second coordinate system at the current time to the first coordinate system based on the vehicle's pose in the first coordinate system at the current time, so as to obtain the detection map in the first coordinate system at the current time. The first matching module is used to match the detected map in the first coordinate system at the current time with the local map in the first coordinate system at the previous time to obtain the first matching result; The pose update module is used to correct the pose of the vehicle in the first coordinate system at the current moment according to the first matching result, so as to obtain the updated pose of the vehicle in the first coordinate system at the current moment. The second matching module is used to obtain the updated detection map in the first coordinate system at the current time based on the updated pose of the vehicle in the first coordinate system at the current time, and then match it with the local map in the first coordinate system at the previous time to obtain the second matching result. The map update module is used to determine the key points to be optimized based on the second matching result and the local map under the first coordinate system at the previous time. The key points to be optimized are defined as nodes in the graph optimization model. At least the distance and direction of two adjacent key points are used as observations. The key points to be optimized are processed by the graph optimization model to obtain the position and error of the optimized key points. Based on the optimized key point positions and errors, update the positions of map elements in the local map of the first coordinate system at the previous time step. The key points to be optimized include at least: third type points; the third type points are the intersection points of the key points to be optimized that are within the third threshold of the head and tail points of the map element.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the map construction method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by a processor, it implements the map construction method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Robot simultaneous positioning and mapping method and device and readable medium

    CN115265523A

  • Map construction method and device, computer equipment and storage medium

    CN117288178A