A high-precision map construction method and device, computer equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-15
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]这一传统技术方案在园区场景中体现出明显的技术落后性,存在建图成本过高且与园区实际需求严重脱节的核心缺陷
通过在仿真平台中配置搭载传感器的车辆,控制车辆沿预设轨迹行驶并录制传感器数据,且预设轨迹包含增强回环检测约束的路径设计,能够确保传感器数据的完整性和有效性,同时通过专属路径设计增强回环检测约束,减少后续建图过程中的定位偏差,为离线建图提供高质量、高可靠性的数据源,保障后续建图工作的顺利开展。
Smart Images

Figure CN122544744A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of map construction technology, and more specifically, to a high-precision map construction method, apparatus, computer equipment, and storage medium. Background Technology
[0002] In the process of implementing autonomous driving technology in closed or semi-closed parks such as factories, logistics centers, and campuses, high-precision maps are an essential core foundation. Autonomous vehicles in these parks rely on centimeter-level precision maps to achieve stable positioning, path planning, and driving decisions. At the same time, most parks have limited mapping budgets and strict requirements for operational access and data confidentiality, making a low-cost and easy-to-implement high-precision map construction method urgently needed.
[0003] Currently, the construction of high-precision maps in park settings still generally adopts the traditional technical solution of professional surveying and mapping. This technology uses high-precision professional surveying equipment, with qualified surveyors completing the collection of park environmental data according to a fixed surveying process, and then producing high-precision maps that meet the requirements of centimeter-level accuracy after professional processing.
[0004] This traditional technical solution exhibits significant technological obsolescence in park scenarios, suffering from core flaws such as excessively high mapping costs and a severe disconnect from the actual needs of parks. The required high-precision professional surveying equipment is expensive, and specialized surveyors are also necessary for the work. The dual high costs of manpower and equipment far exceed the mapping budgets of most parks. Furthermore, the mapping process of this technology is designed for public roads with complex and variable environments. In park scenarios with simple road structures and fixed environments, the entire process is cumbersome and redundant, constituting over-design and further wasting resources and costs. This outdated technology, adapted to public roads, can no longer meet the actual needs of low-cost mapping in parks, becoming a significant factor hindering the implementation of autonomous driving technology in parks. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a high-precision map construction method, apparatus, computer equipment and storage medium, which improves the construction efficiency of high-precision maps of parks, improves the geometric and coordinate accuracy of maps, and improves the economy and practicality of the mapping scheme.
[0006] In a first aspect, embodiments of this application provide a high-precision map construction method, the method comprising: In a simulation platform, a vehicle equipped with sensors is configured, and the vehicle is controlled to drive along a preset trajectory in a preset park scene and record sensor data. The preset trajectory includes a path design to enhance loop closure detection constraints. The recorded sensor data is played back at a speed lower than the real-time acquisition speed, and offline mapping is performed using a simultaneous localization and mapping algorithm to generate a global point cloud map. The global point cloud map is filtered, and a coordinate system transformation is applied to the filtered global point cloud map. Based on the processed global point cloud map, a vector map containing road semantic information is drawn. Multiple sampling points are set in the park scene, the first coordinates of each sampling point in the real coordinate system are obtained, and the second coordinates of each sampling point in the point cloud coordinate system are obtained by registering the sensor data at the sampling points with the processed global point cloud map. Based on the first and second coordinates of multiple sampling points, a transformation matrix from the point cloud coordinate system to the real coordinate system is calculated, and the vector map is subjected to coordinate transformation and deformation correction using the transformation matrix to generate a high-precision target map.
[0007] Optionally, the step of using a simultaneous localization and mapping (SMR) algorithm to perform offline mapping and generate a global point cloud map includes: The replayed sensor data is input into the Cartographer algorithm; Local sub-maps are constructed based on sensor data between adjacent frames through front-end scanning matching using the Cartographer algorithm. The local subgraph is submitted to the backend graph optimization of the Cartographer algorithm. The backend graph optimization is used to perform global optimization of the pose constraints between multiple local subgraphs to eliminate accumulated errors. The global point cloud map is generated based on the optimized local sub-map and pose information.
[0008] Optionally, applying coordinate system transformation to the filtered global point cloud map includes: Obtain the filtered global point cloud map; Determine the grid reference system and its grid identifiers used by the map drawing platform; Based on the position coordinates of the simultaneous positioning and mapping starting point in the grid reference system, calculate the offset from the starting point to the origin corresponding to the grid identifier; The bias is applied to the filtered global point cloud map so that the biased global point cloud map is adapted to the coordinate range of the grid reference system.
[0009] Optionally, the step of drawing a vector map containing road semantic information based on the processed global point cloud map includes: Obtain the processed global point cloud map; The processed global point cloud map is loaded into the vector map drawing platform as a base map reference for visualization; In the vector map drawing platform, the road structure presented by the loaded global point cloud map is used as a visual reference to identify and depict lane boundary lines, traffic light positions, stop lines and pedestrian crossing outlines, and generate a vector map containing semantic information of lanes, traffic lights, stop lines and pedestrian crossings.
[0010] Optionally, the step of registering the sensor data at the sampling points with the processed global point cloud map to obtain the second coordinates of each sampling point in the point cloud coordinate system includes: At the sampling point, a point cloud frame collected by the lidar mounted on the vehicle is acquired; A point cloud registration algorithm is used to perform feature matching between the point cloud frame and the processed global point cloud map to obtain the matching position of the point cloud frame in the processed global point cloud map. The position coordinates of the sampling point in the point cloud coordinate system are determined based on the matching position, and used as the second coordinates.
[0011] Optionally, calculating the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first and second coordinates of multiple sampling points includes: Obtain the first coordinates of multiple sampling points in the real coordinate system and the second coordinates in the point cloud coordinate system; Construct an affine transformation model that includes linear transformation parameters and translation parameters; Using the first coordinate as the target value and the second coordinate as the input value, we substitute them into the affine transformation model and use the least squares method to solve for the linear transformation parameters and translation parameters that minimize the transformation error. The linear transformation parameters and the translation parameters are used to construct an affine transformation matrix, which serves as the transformation matrix from the point cloud coordinate system to the real coordinate system.
[0012] Optionally, the step of using the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a high-precision target map includes: Obtain the vehicle pose at the start of simultaneous localization and mapping, and construct a first transformation matrix from the vehicle coordinate system to the real coordinate system at the start of the mapping based on the vehicle pose. The vector map is transformed from the point cloud coordinate system to the vehicle body coordinate system at the starting time using the first transformation matrix, thus completing the initial alignment based on the initial pose; The vector map, after initial alignment, is transformed from the vehicle coordinate system at the initial moment to the real coordinate system using the transformation matrix. The vector map is then deformed and its coordinates are unified using the transformation matrix to generate the target high-precision map.
[0013] Secondly, embodiments of this application provide a high-precision map construction apparatus, the apparatus comprising: The sensor data recording module is used to configure a vehicle equipped with sensors in a simulation platform, control the vehicle to drive along a preset trajectory in a preset park scene and record sensor data, wherein the preset trajectory includes a path design for enhancing loop closure detection constraints. The global point cloud map generation module is used to play back the recorded sensor data at a playback speed lower than the real-time acquisition speed, and use the simultaneous localization and mapping algorithm to perform offline mapping and generate a global point cloud map. The vector map drawing module is used to filter the global point cloud map, apply coordinate system transformation to the filtered global point cloud map, and draw a vector map containing road semantic information based on the processed global point cloud map. The sampling point coordinate determination module is used to set multiple sampling points in the park scene, obtain the first coordinates of each sampling point in the real coordinate system, and obtain the second coordinates of each sampling point in the point cloud coordinate system by registering the sensor data at the sampling point with the processed global point cloud map. The high-precision map generation module is used to calculate the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first coordinate and the second coordinate of multiple sampling points, and to use the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a target high-precision map.
[0014] Optionally, the step of using a simultaneous localization and mapping (SMR) algorithm to perform offline mapping and generate a global point cloud map includes: The replayed sensor data is input into the Cartographer algorithm; Local sub-maps are constructed based on sensor data between adjacent frames through front-end scanning matching using the Cartographer algorithm. The local subgraph is submitted to the backend graph optimization of the Cartographer algorithm. The backend graph optimization is used to perform global optimization of the pose constraints between multiple local subgraphs to eliminate accumulated errors. The global point cloud map is generated based on the optimized local sub-map and pose information.
[0015] Optionally, applying coordinate system transformation to the filtered global point cloud map includes: Obtain the filtered global point cloud map; Determine the grid reference system and its grid identifiers used by the map drawing platform; Based on the position coordinates of the simultaneous positioning and mapping starting point in the grid reference system, calculate the offset from the starting point to the origin corresponding to the grid identifier; The bias is applied to the filtered global point cloud map so that the biased global point cloud map is adapted to the coordinate range of the grid reference system.
[0016] Optionally, the step of drawing a vector map containing road semantic information based on the processed global point cloud map includes: Obtain the processed global point cloud map; The processed global point cloud map is loaded into the vector map drawing platform as a base map reference for visualization; In the vector map drawing platform, the road structure presented by the loaded global point cloud map is used as a visual reference to identify and depict lane boundary lines, traffic light positions, stop lines and pedestrian crossing outlines, and generate a vector map containing semantic information of lanes, traffic lights, stop lines and pedestrian crossings.
[0017] Optionally, the step of registering the sensor data at the sampling points with the processed global point cloud map to obtain the second coordinates of each sampling point in the point cloud coordinate system includes: At the sampling point, a point cloud frame collected by the lidar mounted on the vehicle is acquired; A point cloud registration algorithm is used to perform feature matching between the point cloud frame and the processed global point cloud map to obtain the matching position of the point cloud frame in the processed global point cloud map. The position coordinates of the sampling point in the point cloud coordinate system are determined based on the matching position, and used as the second coordinates.
[0018] Optionally, calculating the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first and second coordinates of multiple sampling points includes: Obtain the first coordinates of multiple sampling points in the real coordinate system and the second coordinates in the point cloud coordinate system; Construct an affine transformation model that includes linear transformation parameters and translation parameters; Using the first coordinate as the target value and the second coordinate as the input value, we substitute them into the affine transformation model and use the least squares method to solve for the linear transformation parameters and translation parameters that minimize the transformation error. The linear transformation parameters and the translation parameters are used to construct an affine transformation matrix, which serves as the transformation matrix from the point cloud coordinate system to the real coordinate system.
[0019] Optionally, the step of using the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a high-precision target map includes: Obtain the vehicle pose at the start of simultaneous localization and mapping, and construct a first transformation matrix from the vehicle coordinate system to the real coordinate system at the start of the mapping based on the vehicle pose. The vector map is transformed from the point cloud coordinate system to the vehicle body coordinate system at the starting time using the first transformation matrix, thus completing the initial alignment based on the initial pose; The vector map, after initial alignment, is transformed from the vehicle coordinate system at the initial moment to the real coordinate system using the transformation matrix. The vector map is then deformed and its coordinates are unified using the transformation matrix to generate the target high-precision map.
[0020] Thirdly, embodiments of this application provide a computer device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the high-precision map construction method described in any of the optional embodiments of the first aspect are performed.
[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the high-precision map construction method described in any of the optional embodiments of the first aspect.
[0022] The technical solution provided in this application includes, but is not limited to, the following beneficial effects: By configuring a vehicle equipped with sensors in a simulation platform, controlling the vehicle to travel along a preset trajectory and recording sensor data, and the preset trajectory including a path design with enhanced loop closure detection constraints, the integrity and validity of the sensor data can be ensured. At the same time, the loop closure detection constraints are enhanced through dedicated path design, reducing positioning deviations in the subsequent mapping process, providing a high-quality and highly reliable data source for offline mapping, and ensuring the smooth progress of subsequent mapping work.
[0023] By replaying sensor data at a speed lower than the real-time acquisition speed and using simultaneous localization and mapping algorithms for offline mapping, problems such as frame loss and insufficient computing power that occur during real-time mapping can be avoided. This balances mapping quality with computing resource consumption, ensuring that the generated global point cloud map has good consistency and integrity, and providing a reliable foundation for subsequent point cloud processing and vector map drawing.
[0024] Filtering the global point cloud map can effectively compress the point cloud file size, reduce the pressure of subsequent processing, and preserve the core features of the road. Applying coordinate system transformation to the filtered point cloud map can adapt to the needs of subsequent vector map drawing, ensuring that the point cloud map can be used normally for visualization reference. Drawing a vector map containing road semantic information based on the processed point cloud map can clarify the core semantics related to the road, providing key support for the localization and path planning of autonomous vehicles.
[0025] Setting up multiple sampling points in the park scenario can fully cover the core area of the park and ensure the representativeness of the sampling data. The first coordinates of each sampling point in the real coordinate system are obtained, and the second coordinates in the point cloud coordinate system are obtained through point cloud registration. The correspondence between the two coordinate systems is established, providing a sufficient and accurate data foundation for the subsequent calculation of the transformation matrix and ensuring the accuracy of coordinate transformation.
[0026] The transformation matrix is calculated based on the first and second coordinates of multiple sampling points, which can accurately obtain the transformation relationship from the point cloud coordinate system to the real coordinate system. By using this transformation matrix to perform coordinate transformation and deformation correction on the vector map, the vector map can be accurately aligned with the real coordinate system, eliminating global deformation and coordinate deviation generated during the mapping process. Finally, a high-precision target map with the required accuracy can be generated and directly applied to meet the needs of autonomous vehicles.
[0027] The five steps described above are sequentially linked and work synergistically to form a complete high-precision map construction process. The beneficial effects of each step support each other and progress layer by layer. Through the cooperation of each step, key issues such as data source quality, mapping efficiency, coordinate alignment, and accuracy control in the high-precision map construction process are effectively solved, improving the construction efficiency of the park's high-precision map, enhancing map geometry and coordinate accuracy, and simultaneously improving the economy and practicality of the mapping scheme.
[0028] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 A flowchart of a high-precision map construction method provided in Embodiment 1 of this application is shown; Figure 2 A schematic diagram of a mapping vehicle provided in Embodiment 1 of this application is shown; Figure 3 This illustration shows a top-view diagram of a park mapping scenario provided in Embodiment 1 of this application; Figure 4 A flowchart of a global point cloud map generation method provided in Embodiment 1 of this application is shown; Figure 5This document illustrates a mapping trajectory and a global point cloud provided in Embodiment 1 of this application. Figure 6 A flowchart of a coordinate system transformation processing method provided in Embodiment 1 of this application is shown; Figure 7 A flowchart of a vector map generation method provided in Embodiment 1 of this application is shown; Figure 8 This illustration shows a schematic diagram of a global point cloud-based high-precision vector map provided in Embodiment 1 of this application; Figure 9 A schematic diagram showing the details of lane information in a high-precision map provided in Embodiment 1 of this application is illustrated. Figure 10 A flowchart of a sampling point coordinate generation method provided in Embodiment 1 of this application is shown; Figure 11 This diagram illustrates the effect of point cloud registration before registration, as provided in Embodiment 1 of this application. Figure 12 A schematic diagram showing the effect of point cloud registration provided in Embodiment 1 of this application is shown; Figure 13 A flowchart of a transformation matrix generation method provided in Embodiment 1 of this application is shown; Figure 14 A flowchart of a target high-precision map generation method provided in Embodiment 1 of this application is shown; Figure 15 A schematic diagram illustrating the visualization effect of coordinate system transformation provided in Embodiment 1 of this application is shown; Figure 16 A schematic diagram of a sampling point correction error distribution provided in Embodiment 1 of this application is shown; Figure 17 A flowchart of a high-precision map construction apparatus provided in Embodiment 1 of this application is shown; Figure 18 A schematic diagram of the structure of a computer device provided in Embodiment 3 of this application is shown. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0032] Example 1 To facilitate understanding of this application, the following is combined with... Figure 1 The flowchart of the high-precision map construction method provided in Embodiment 1 of this application illustrates Embodiment 1 in detail.
[0033] See Figure 1 As shown, Figure 1 The flowchart of a high-precision map construction method provided in Embodiment 1 of this application is shown, wherein the method includes steps S101 to S105: S101: Configure a vehicle equipped with sensors in the simulation platform, control the vehicle to drive along a preset trajectory in a preset park scene and record sensor data, wherein the preset trajectory includes a path design for enhancing loop closure detection constraints.
[0034] Specifically, the simulation platform used is Carla Simulator (an open-source autonomous driving simulation platform), and the vehicle used is the vehicle.micro.microlino small vehicle that comes with the platform. The advantage of this vehicle model is that it can complete reversing, U-turns, and other operations in narrow sections of the park, adapting to the complex road driving needs of the park. The configured sensors are LiDAR, IMU (Inertial Measurement Unit), and GNSS (Global Navigation Satellite System). Each sensor has a fixed installation position and specific parameters in the vehicle coordinate system. The LiDAR installation position is [0, 0, 2.4, 0, 0, 0], and the parameters are a detection range of 50m, 32 lines, a vertical field of view of [-26.8, 2.0], and a sampling frequency of 20Hz. The IMU installation position is [2, 0, 2, 0, 0, 0], and the sampling frequency is 25Hz. The GNSS installation position is [1, 0, 2, 0, 0, 0], and the sampling frequency is 22Hz.
[0035] See Figure 2 As shown, Figure 2 This diagram illustrates a mapping vehicle provided in Embodiment 1 of this application. The diagram shows the vehicle.micro.microlino small vehicle selected in Carla Simulator (an open-source autonomous driving simulation platform) for mapping purposes. This vehicle type is suitable for narrow roads within a park and can perform complex operations such as reversing and U-turns. It is equipped with sensors such as LiDAR, IMU (Inertial Measurement Unit), and GNSS (Global Navigation Satellite System), and travels along an optimized trajectory within a preset park scenario, recording sensor data. It is the core carrier for mapping data acquisition.
[0036] The preset park scene can be the Town01 scene from Carla Simulator, which covers an area of approximately 390×370m and is suitable for the scene testing requirements of park mapping. The preset trajectory is designed based on the active detour trajectory optimization method of "feature density analysis". At key nodes such as park intersections and areas with dense signs, the vehicle is controlled to make small-range detours. 2-3 active detour operations are added every 10 kilometers. This path design allows the vehicle to observe the same sign from multiple perspectives with different vehicle orientations, increasing the multi-view observation data of the same location.
[0037] See Figure 3 As shown, Figure 3This illustration shows a top-down view of a campus mapping scenario provided in Embodiment 1 of this application. This top-down map is the core campus mapping test scenario pre-set by this solution, covering an area of approximately 390×370m. A mapping vehicle (vehicle.micro.microlino, a small vehicle) travels along an active detour trajectory designed based on feature density analysis to enhance loop closure detection constraints within this environment labeled CARLA Simulator Town01. Simultaneously, it records full data from sensors such as LiDAR, IMU (Inertial Measurement Unit), and GNSS (Global Navigation Satellite System). This scenario features regular, structured road and building distribution characteristics, providing a typical closed campus environment for offline mapping using the Cartographer (Google's open-source SLAM (Simultaneous Localization and Mapping) algorithm). This effectively verifies the enhanced loop closure detection effect and the accuracy of the generated global point cloud map, laying a crucial scene and data foundation for subsequent high-precision map drawing, registration, and correction.
[0038] The sensor data recording was completed using the ROS 2 (Robot Operating System 2) Humble middleware. All sensor data from LiDAR, IMU, and GNSS during vehicle operation were recorded in ros2bag format, providing a complete data source for subsequent offline mapping. The recording operation was completed in the Ubuntu 22.04 operating system, and the overall hardware environment used an Intel i9-14900K processor and an NVIDIA RTX 4090 graphics card.
[0039] S102: Play back the recorded sensor data at a playback speed lower than the real-time acquisition speed, and use the simultaneous localization and mapping algorithm to perform offline mapping and generate a global point cloud map.
[0040] Specifically, the playback speed, which is lower than the real-time acquisition speed, is set to 0.5x. This speed setting allows sufficient computation time for the backend optimization of the Cartographer (Cartographer, Google's open-source SLAM algorithm), avoiding frame drops in real-time mapping while balancing mapping quality and computational resource consumption. The hardware testing environments for playback and mapping are divided into two types: low configuration with a 12th Gen Intel® Core™ i9-12900H (2.50 GHz) and 32GB RAM, and high configuration with an Intel® Core™ i9-14900K (6GHz) and 64GB RAM. The 0.5x playback speed allows low-configuration computers to achieve similar mapping effects as high-configuration computers.
[0041] The simultaneous localization and mapping algorithm uses Google's open-source Cartographer algorithm from the SLAM (Simultaneous Localization and Mapping) algorithm. This algorithm focuses on front-end scan matching and back-end map optimization, and is good at building consistent 2D / 3D maps of large-scale environments. Before mapping, specific parameter configurations need to be completed. The core parameters include: translation weight of 50 and rotation weight of 100 for the prior pose provided by odometry; translation weight of 1e3 and rotation weight of 1e3 for odometry during back-end optimization; translation weight of 1e4 and rotation weight of 1e4 for local SLAM pose; and acceleration weight of 5e2 and rotation weight of 1e4 for IMU.
[0042] It should be noted that the SLAM algorithm is not limited to Cartographer. Other algorithms such as FAST-LIO2 can also be used. After parameter optimization, the mapping accuracy can be improved to 0.05m to adapt to higher precision application scenarios.
[0043] Offline mapping adopts a "record first, process later" approach to avoid the high computational demands caused by running Carla Simulator simulation and Cartographer mapping simultaneously. The specific mapping process is as follows: input the ros2bag format sensor data played back at 0.5x speed into the Cartographer algorithm to generate a pbstream format mapping result. Then, use Cartographer's assets_writer tool to convert the pbstream format to a ply format point cloud file. Finally, use PCL's (Point Cloud Library) pcl_ply2pcd tool to convert the ply format to a pcd format point cloud file, thus obtaining the global point cloud map (a 3D point cloud map of the entire scene).
[0044] The 0.5x playback mapping mode effectively controls computational resource consumption. Based on test data from a 13.8GB rosbag package, CPU utilization in this mode is stable at 65-75% (compared to 95-100% for traditional full-speed playback), memory usage is controlled within 8GB (compared to 12GB+ for traditional full-speed playback), and the ratio of mapping time to data duration is 2:1 (compared to 1:1 for real-time processing in traditional full-speed playback). This avoids program termination and mapping failures caused by excessive CPU and memory usage.
[0045] S103: Filter the global point cloud map, apply coordinate system transformation to the filtered global point cloud map, and draw a vector map containing road semantic information based on the processed global point cloud map.
[0046] Specifically, the filtering process for the global point cloud map adopts PCL's Voxel Grid Filter algorithm, with the filter leaf size set to 0.1m. This process can significantly compress the point cloud file size while preserving core features such as roads and landmarks. Based on a 13.8G pcd format global point cloud map test, the file size after filtering can be reduced to 400MB, which is suitable for the file upload and processing requirements of subsequent map drawing platforms.
[0047] The core purpose of coordinate system transformation is to adapt to the coordinate system of Vector Map Builder (an online vector map creation platform). This platform uses MGRS (Military Grid Reference System) to express map locations, and it is necessary to configure both the grid identifier of MGRS and the offset from the map to the grid identifier. Therefore, the corresponding coordinate offset needs to be applied to the filtered global point cloud map.
[0048] In actual park mapping, it is necessary to query the MGRS grid identifier of the SLAM starting point and the offset from the SLAM starting point to the origin corresponding to the grid identifier, and then apply the offset to the point cloud map. In the Carla Simulator simulation scenario, since there is no actual MGRS grid identifier, it is necessary to apply an offset to make the point cloud fall entirely in the first quadrant of the point cloud coordinate system. The simulation offset set in this solution is x+1000m and y+1000m.
[0049] Vector map drawing is completed based on the Vector Map Builder platform. The filtered and biased global point cloud map in PCD format is loaded into the platform. Using the point cloud map as a visual reference, a vector map containing core semantic information such as lanes, traffic lights, stop lines, and pedestrian crossings is drawn. The map format selected is Lanelet2 (Lanelet2 is a high-precision map data format used for autonomous driving).
[0050] Lanelet2 is a high-precision map data format designed specifically for autonomous driving. It uses passable lanes as the basic unit and describes the road network in layers of points, lines, and polygons. It contains rich semantic information and topological relationships, which can support the accurate positioning and path planning of autonomous vehicles. It is a high-precision map format widely used in the industry. When drawing, the Linestring tool is used to construct lane boundary lines to form lane units, and the TrafficLight tool is used to mark the location of traffic lights and draw the corresponding stop lines. At the same time, the outline of pedestrian crossings is drawn to ensure the complete semantic information of the vector map.
[0051] S104: Set multiple sampling points in the park scene, obtain the first coordinates of each sampling point in the real coordinate system, and obtain the second coordinates of each sampling point in the point cloud coordinate system by registering the sensor data at the sampling point with the processed global point cloud map.
[0052] Specifically, 20 sampling points are evenly distributed, covering a 390×370m park scene. This number and distribution method can make the registration error evenly distributed, effectively improving the accuracy of subsequent coordinate transformation and deformation correction. The Carla Map coordinate system is selected as the real coordinate system. The first coordinate of each sampling point in this coordinate system is directly used as the vehicle pose at the sampling point.
[0053] The sensor data at the sampling points are selected from the point cloud frames collected by the LiDAR on the vehicle. These point cloud frames are real-time data collected by the 32-line LiDAR at the sampling points, preserving the environmental features around the sampling points, and are the core data source for point cloud registration.
[0054] Point cloud registration uses Open3D (an open-source point cloud processing library) to match ground point clouds. The registration is performed in two steps: the first step is to perform coarse matching of ground point cloud features to achieve preliminary alignment between the point cloud frame and the processed global point cloud map; the second step is to further adjust the horizontal transformation based on the ground point cloud feature matching to complete fine matching of features in the horizontal direction, and finally obtain the accurate matching position of the point cloud frame in the processed global point cloud map.
[0055] The visualization effect of point cloud registration is as follows: the point cloud frame to be matched is displayed in red, and the global point cloud map is displayed in white. Before registration, there is a significant positional deviation between the red point cloud and the white point cloud. After registration, the red point cloud and the white point cloud can be accurately matched to ensure the accuracy of the matching position.
[0056] The second coordinate is determined based on the matching position of the point cloud frame in the global point cloud map. Combined with the installation position of the LiDAR in the vehicle coordinate system ([0, 0, 2.4, 0, 0, 0]), the three-dimensional position coordinates of the sampling point in the point cloud coordinate system are obtained through coordinate transformation. These coordinates are the second coordinates of the sampling point.
[0057] S105: Based on the first coordinates and the second coordinates of multiple sampling points, calculate the transformation matrix from the point cloud coordinate system to the real coordinate system, and use the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a high-precision target map.
[0058] Specifically, the calculation of the transformation matrix is based on the affine transformation model and the least squares method. First, a two-dimensional affine transformation model containing linear transformation parameters and translation parameters is constructed. Then, the first coordinates of 20 sampling points are used as the target value and the second coordinates are used as the input values. After substituting them into the model, the parameters that minimize the transformation error are solved by the least squares method. Finally, the parameters constitute the affine transformation matrix, which is the transformation matrix from the point cloud coordinate system to the real coordinate system.
[0059] The calculated transformation matrix can effectively reduce registration error. In this scheme, the average error in the horizontal direction is reduced to 0.591m, and the standard deviation of the registration error is reduced to 0.59m. In the error visualization comparison, the blue points in the point cloud coordinate system and the red points in the Carla Map coordinate system have obvious deviations before registration. After being transformed by the transformation matrix, the green points and red points almost completely overlap, and the correction effect is significant.
[0060] The coordinate transformation and deformation correction of the vector map requires first transforming the point cloud coordinate system to the vehicle coordinate system of the SLAM starting point, then transforming the vehicle coordinate system to the real coordinate system, and finally correcting the global point cloud deformation generated during the SLAM mapping process (this deformation will be inherited by the vector map) through the transformation matrix, so as to achieve deformation correction and coordinate unification of the vector map.
[0061] The generated high-precision map is in Lanet2 format and has the correct global coordinate system (Carla Map coordinate system, which can be converted to UTM (Universal Transverse Mercator), national coordinate system or park-defined coordinate system in actual mapping). It meets the centimeter-level accuracy requirements for positioning, path planning and decision-making of autonomous vehicles in the park. It does not rely on expensive professional surveying equipment, large-scale crowdsourced data or complex roadside facilities, and is a low-cost high-precision map suitable for park scenarios.
[0062] In an optional implementation, see Figure 4 As shown, Figure 4 The flowchart of a global point cloud map generation method provided in Embodiment 1 of this application is shown. The step of generating a global point cloud map by performing offline mapping using a simultaneous localization and mapping algorithm includes steps S401-S404: S401: Input the replayed sensor data into the Cartographer algorithm.
[0063] Specifically, the replayed sensor data is in ROS2 bag format, played at 0.5x speed. It includes full sensor data from LiDAR, IMU, and GNSS, and the data is recorded from the Carla Simulator as the vehicle travels along the optimized trajectory, preserving environmental features from multiple perspectives. Before input, all parameters of the Cartographer algorithm have been configured, covering translation and rotation weights for odometry, IMU, local SLAM, and backend optimization, ensuring that the algorithm can achieve stable mapping based on the input data.
[0064] The Cartographer algorithm is an open-source SLAM algorithm from Google. Its core architecture consists of front-end scan matching and back-end graph optimization. It excels at handling mapping tasks in large-scale structured scenes and is well-suited to the characteristics of relatively fixed road structures in parks. It is the core algorithm for offline mapping in this solution.
[0065] S402: Construct a local sub-map based on sensor data between adjacent frames by front-end scanning matching using the Cartographer algorithm.
[0066] Specifically, front-end scanning and matching is the core of the Cartographer algorithm. It uses the lidar point cloud data of adjacent frames as the core, combined with IMU and GNSS auxiliary positioning data, to complete feature matching and pose estimation between frames and determine the relative positional relationship between adjacent frames.
[0067] The construction of local sub-maps is completed step by step based on the inter-frame pose estimation results. Taking local road segments in the park as units, the point cloud data of adjacent frames are fused and stitched together to form a sub-map with local environmental features. Each local sub-map retains the core features of the road segment, such as lanes, curbs, and landmarks, laying the foundation for the construction of the global point cloud map.
[0068] S403: Submit the local subgraph to the backend graph optimization of the Cartographer algorithm. The backend graph optimization is used to globally optimize the pose constraints between multiple local subgraphs and eliminate accumulated errors.
[0069] Specifically, the backend map optimization uses the weight parameters configured by Cartographer as constraints, and combines IMU inertial data and GNSS satellite positioning data to globally solve and adjust the pose constraints of all local sub-maps. The core is to use the complementarity of multi-sensor data to correct the positioning deviation caused by a single sensor.
[0070] The active detour design of the preset trajectory in this scheme provides more loop closure detection constraints for backend graph optimization, enabling the algorithm to identify and match multi-view local subgraphs of the same key node, which greatly improves the effect of global optimization, effectively eliminates the cumulative error generated during SLAM mapping, and solves the problems of subgraph drift and difficulty in matching features at the same location caused by excessive IMU cumulative error in large scenes.
[0071] S404: Generate the global point cloud map based on the optimized local sub-map and pose information.
[0072] Specifically, firstly, all local sub-images optimized by the backend are integrated. Based on the global pose information of each local sub-image, the local sub-images are accurately stitched and merged to form a complete point cloud model of the park scene, and the pbstream format mapping result exclusive to the Cartographer algorithm is generated first.
[0073] The pbstream format is then converted to a ply format point cloud file using Cartographer's assets_writer tool. This format is a common point cloud file format that preserves the 3D coordinates and feature information of the point cloud. Finally, the pcl_ply2pcd tool of PCL is used to convert the ply format to a pcd format point cloud file. This format is the standard format for subsequent filtering, registration, and vector map drawing, which is the final generated global point cloud map.
[0074] See Figure 5 As shown, Figure 5This illustration shows a mapping trajectory and a global point cloud provided in Embodiment 1 of this application. The illustration displays the mapping trajectory (blue line) and the global point cloud map (grayscale point cloud) after offline mapping. The mapping trajectory is the driving path generated by the Cartographer algorithm's front-end scanning and matching and back-end map optimization when the vehicle replays sensor data at 0.5x speed. It includes active detour design to enhance loop closure detection constraints. The grayscale point cloud is the optimized global point cloud map, which will subsequently be processed using PCL (Point Cloud Library) voxel grid filtering (Leaf Size=0.1m) and MGRS (Military Grid Reference System) coordinate system offset processing to provide a base map reference for vector map drawing.
[0075] In an optional implementation, see Figure 6 As shown, Figure 6 The flowchart of a coordinate system transformation processing method provided in Embodiment 1 of this application is shown, wherein the coordinate system transformation processing applied to the filtered global point cloud map includes steps S601 to S604: S601: Obtain the filtered global point cloud map.
[0076] Specifically, the global point cloud map is a PCD format point cloud map processed by PCL's Voxel Grid Filter. The Leaf Size is set to 0.1m during filtering to achieve efficient compression of the point cloud file while preserving core environmental features such as park roads and landmarks.
[0077] Based on the test of the original 13.8G PCD format global point cloud map, after the filtering process, the file size can be reduced from 13.8G to 400MB, which greatly reduces the file upload and processing pressure of the subsequent map drawing platform, and does not affect the visual reference effect of vector map drawing.
[0078] S602: Determine the grid reference system and its grid identifier used by the map drawing platform.
[0079] Specifically, the map drawing platform selected is Vector Map Builder, an online vector map creation platform. This platform is the core tool for drawing high-precision vector maps in this solution, and it is suitable for low-cost and engineering-friendly mapping needs.
[0080] The platform uses MGRS as its core grid reference system. This system needs to express the location information of the map through grid identifiers and offsets. The grid identifier is a unique grid number for the global region division of the MGRS system, which is the basis for determining the global location of the map.
[0081] In actual park mapping, the grid identifier needs to be obtained by querying the MGRS grid number of the park's location on-site. In the CarlaSimulator simulation scenario, since there is no actual geographical area corresponding to it, there is no real MGRS grid identifier. Coordinate adaptation needs to be achieved through subsequent offset settings.
[0082] S603: Based on the position coordinates of the simultaneous positioning and mapping starting point in the grid reference system, calculate the offset from the starting point to the origin corresponding to the grid identifier.
[0083] Specifically, the starting point for both positioning and mapping is the initial position of the vehicle when it begins mapping in Carla Simulator, which is also the origin reference position of the point cloud coordinate system. In actual park mapping, it is necessary to use professional equipment to query the precise three-dimensional position coordinates of this starting point in the MGRS grid reference system, and then use these coordinates as a reference to calculate the translation distance from the starting point to the corresponding MGRS grid identifier origin. This distance is the offset, which includes values in the x, y, and z directions.
[0084] In the Carla Simulator simulation scenario, since there are no actual MGRS grid markers and origins, there is no need to calculate the actual offset. Instead, a virtual offset is set. The core purpose is to ensure that the filtered global point cloud map falls entirely in the first quadrant of the point cloud coordinate system, so that the Vector Map Builder platform can load and display the point cloud map normally. In this solution, the virtual offset is set to x+1000m and y+1000m.
[0085] S604: Apply the bias amount to the filtered global point cloud map so that the global point cloud map with the applied bias is adapted to the coordinate range of the grid reference system.
[0086] Specifically, the application of the bias is a coordinate translation operation. The three-dimensional coordinates of all points in the filtered PCD format global point cloud map are added with the values of the x, y, and z directions of the bias, thereby achieving the coordinate translation of the entire point cloud map.
[0087] In actual park mapping, this translation operation allows the coordinates of the point cloud map to match the coordinate range of the MGRS grid reference system, ensuring that the Vector Map Builder platform can recognize the global position of the map. In simulation scenarios, the translation operations of x+1000m and y+1000m ensure that the point cloud map falls completely in the first quadrant of the point cloud coordinate system, avoiding platform loading failures caused by negative coordinates and ensuring the smooth progress of subsequent vector map drawing.
[0088] In an optional implementation, see Figure 7 As shown, Figure 7 The flowchart of a vector map generation method provided in Embodiment 1 of this application is shown, wherein the step of drawing a vector map containing road semantic information based on the processed global point cloud map includes steps S701 to S703: S701: Obtain the processed global point cloud map.
[0089] Specifically, the processed global point cloud map is a PCD format point cloud map processed in two steps. The first step is to use PCL's Voxel Grid Filter for voxel mesh filtering (leaf size is 0.1m). The second step is to apply the offset of the MGRS grid reference system for coordinate translation. This point cloud map retains core environmental features such as park roads, curbs, traffic signs, and stop lines, and the file size is adapted to the processing requirements of the Vector Map Builder platform.
[0090] This point cloud map is a 3D point cloud map that can be switched between 2D and 3D visualization in the Vector Map Builder platform. It provides a clear and intuitive environmental visual reference for vector map drawing, ensuring that the semantic information drawn is consistent with the actual road structure in the park.
[0091] See Figure 8 As shown, Figure 8 This illustration shows a schematic diagram of a global point cloud-based high-precision vector map provided in Embodiment 1 of this application. The map is a high-precision vector map drawn in Vector Map Builder (an online vector map creation platform) based on the processed global point cloud map (green lines represent road / lane topology). After filtering and MGRS bias processing, the global point cloud serves as a visualization base map. Semantic information such as lane boundaries and traffic facilities are manually identified and depicted to generate a high-precision map in Lanelet2 (a high-precision map data format for autonomous driving) format. The green lines in the diagram represent the lane network topology of the park's roads.
[0092] S702: Load the processed global point cloud map into the vector map drawing platform as a base map reference for visualization.
[0093] Specifically, the vector map drawing platform is Vector Map Builder, an online vector map creation platform. This platform has functions such as point cloud map uploading, loading, visualization, and vector element drawing, and is suitable for low-cost, lightweight mapping needs, without the need for professional surveying software and equipment.
[0094] After the processed PCD format global point cloud map is uploaded to the platform, the platform can automatically parse the three-dimensional coordinate information of the point cloud and realize the visualization of the point cloud map. The map painters can view the point cloud features of different road sections and nodes in the park through operations such as zooming, panning, and switching perspectives, providing accurate base map references for the subsequent drawing of vector semantic elements.
[0095] S703: In the vector map drawing platform, using the road structure presented by the loaded global point cloud map as a visual reference, identify and depict lane boundary lines, traffic light positions, stop lines, and pedestrian crossing outlines, and generate a vector map containing semantic information of lanes, traffic lights, stop lines, and pedestrian crossings.
[0096] Specifically, the drawing of vector semantic elements is completed using platform-specific tools. Lanes are drawn using the Linestring tool, which identifies lane boundary features in the point cloud map to outline the left and right boundaries of the lanes, forming a lane network with passable lanes as the basic units, ensuring that the geometry of the lanes is consistent with the actual road. Traffic lights and stop lines are drawn using the TrafficLight tool, which first identifies and marks the location of traffic light markers in the point cloud map, and then draws stop lines in front of the lanes according to the corresponding driving rules of the traffic lights, ensuring that the position of the stop lines matches the lanes.
[0097] The rendering of pedestrian crossings involves identifying the characteristics of pedestrian crossing areas in the point cloud map, outlining the outline of the pedestrian crossings, and marking their positions in the road network to ensure the correct topological relationship between pedestrian crossings, lanes, and intersections. The rendering of all vector semantic elements follows the actual structure of the park's roads to ensure the accuracy and completeness of semantic information.
[0098] The vector map generated after drawing is in Lanet2 format, which is a high-precision map data format designed specifically for autonomous driving. It can completely save the geometric information, semantic information and topological relationships of lanes, traffic lights, stop lines and pedestrian crossings, supporting the accurate positioning, path planning and decision-making of autonomous vehicles. It is also an industry-standard format that can be directly deployed to the control system of autonomous vehicles.
[0099] See Figure 9 As shown, Figure 9This diagram illustrates a high-precision map lane information detail provided in Embodiment 1 of this application. The diagram showcases the lane details of the high-precision map, clearly presenting core lane information such as lane boundary lines and intersection turning topology. In the Vector Map Builder platform, using the global point cloud as a visual reference, the Linestring tool is used to outline lane boundary lines to form passable lane units, while simultaneously annotating intersection turning relationships. This lane information is the core semantic content of the Lanelet2 format vector map, used for precise positioning and path planning of autonomous vehicles.
[0100] In an optional implementation, see Figure 10 As shown, Figure 10 The flowchart of a sampling point coordinate generation method provided in Embodiment 1 of this application is shown. The method involves registering sensor data at the sampling points with a processed global point cloud map to obtain the second coordinates of each sampling point in the point cloud coordinate system, including steps S1001-S1003. S1001: At the sampling point, acquire the point cloud frame collected by the lidar mounted on the vehicle.
[0101] Specifically, the vehicle is equipped with a 32-line 3D LiDAR, which is installed in the vehicle coordinate system [0, 0, 2.4, 0, 0, 0], with a detection range of 50m, a vertical field of view of [-26.8, 2.0], and a sampling frequency of 20Hz. These sensor parameters ensure that the collected point cloud frames retain the complete environmental features around the sampling points.
[0102] At the sampling point, the vehicle remains stationary or moves at low speed, collecting single or multiple frames of point cloud data from the LiDAR as point cloud frames. Multiple frames of point cloud data can be fused to improve the feature richness of the point cloud frames, providing a more accurate data source for subsequent point cloud registration. The point cloud frames are in PCD format, which is consistent with the format of the processed global point cloud map, and is compatible with the processing requirements of the point cloud registration algorithm.
[0103] S1002: The point cloud frame is matched with the processed global point cloud map using a point cloud registration algorithm to obtain the matching position of the point cloud frame in the processed global point cloud map.
[0104] Specifically, this solution uses Open3D ground point cloud matching as the core point cloud registration algorithm. This algorithm uses ground point cloud as the core matching feature, which is suitable for the scene characteristics of park roads with hard ground, and has higher matching accuracy and stronger stability.
[0105] Point cloud registration is divided into two stages: coarse matching and fine matching. The first stage is coarse matching of ground point cloud features, which extracts ground point cloud features from the point cloud frame and the global point cloud map. Through feature matching, the point cloud frame and the global point cloud map are initially aligned, and the approximate position of the point cloud frame is determined. The second stage is fine matching of horizontal transformation, which adjusts the horizontal pose of the point cloud frame based on coarse matching, completes the precise alignment of features in the horizontal direction, and eliminates the horizontal deviation caused by coarse matching.
[0106] The visualization effect of point cloud registration can intuitively reflect the matching accuracy: the point cloud frame to be matched is displayed in red, and the processed global point cloud map is displayed in white. Before registration, there is a significant positional deviation between the red point cloud and the white point cloud. After registration, the red point cloud and the white point cloud are accurately matched without significant offset, ensuring the accuracy of the matching position.
[0107] See Figure 11 As shown, Figure 11 The diagram shows the effect of point cloud registration before registration provided in Embodiment 1 of this application. The diagram shows the visual effect of point cloud frames at sampling points and global point cloud maps before registration. The red point cloud is the point cloud frame to be matched collected by the lidar at the sampling point, and the white point cloud is the processed global point cloud map. There is a significant deviation between the two in spatial position, which provides an original comparison benchmark for subsequent point cloud registration operations.
[0108] See Figure 12 As shown, Figure 12 The diagram illustrates the effect of point cloud registration provided in Embodiment 1 of this application. The diagram shows the visual effect of the point cloud frame at the sampling point being registered with the global point cloud map. Using the Open3D (open3D, an open-source point cloud processing library) ground point cloud registration algorithm, after coarse matching and horizontal transformation fine matching, the red point cloud to be matched and the white global point cloud map achieve precise spatial alignment. This allows the second coordinate of the sampling point in the point cloud coordinate system to be determined, providing the core data foundation for subsequent calculation of the transformation matrix from the point cloud coordinate system to the real coordinate system.
[0109] S1003: Determine the position coordinates of the sampling point in the point cloud coordinate system based on the matching position, and use them as the second coordinates.
[0110] Specifically, the matching position of the point cloud frame in the global point cloud map is the three-dimensional position coordinate of the lidar coordinate system in the point cloud coordinate system when the lidar collects the point cloud frame at the sampling point.
[0111] Based on the fixed installation position of the LiDAR in the vehicle coordinate system [0, 0, 2.4, 0, 0, 0], the matching position of the LiDAR coordinate system is converted into the position coordinates of the vehicle coordinate system through coordinate transformation. These coordinates are the three-dimensional position coordinates of the sampling point in the point cloud coordinate system, which is the second coordinate mentioned in this step. During the conversion process, the z-axis coordinate deviation caused by the LiDAR installation height (2.4m) needs to be eliminated to ensure the accuracy of the second coordinate.
[0112] In an optional implementation, see Figure 13 As shown, Figure 13 The flowchart of a transformation matrix generation method provided in Embodiment 1 of this application is shown, wherein the step of calculating the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first coordinates and the second coordinates of multiple sampling points includes steps S1301 to S1304: S1301: Obtain the first coordinates of multiple sampling points in the real coordinate system and the second coordinates in the point cloud coordinate system.
[0113] Specifically, this scheme uses 20 sampling points, evenly distributed within a 390×370m park area. This number and distribution ensure that the sampling points cover the core roads and nodes of the park, allowing the subsequent transformation matrix to adapt to the coordinate transformation and deformation correction of the entire park.
[0114] The true coordinate system is the Carla Map coordinate system. The first coordinate represents the vehicle pose at each sampling point, which is the three-dimensional position coordinate in this coordinate system, denoted as . The point cloud coordinate system is the coordinate system of the global point cloud map generated by SLAM mapping. The second coordinate is the three-dimensional position coordinate of the sampling point obtained through point cloud registration and coordinate transformation, denoted as... The first and second coordinates of the 20 sampling points are in a one-to-one correspondence, forming 20 sets of coordinate pairs, which provides a sufficient data foundation for the calculation of the transformation matrix.
[0115] S1302: Construct an affine transformation model that includes linear transformation parameters and translation parameters.
[0116] Specifically, this solution constructs a two-dimensional affine transformation model to meet the horizontal positioning and navigation requirements of autonomous vehicles in the park. The algebraic expression of the model is as follows:
[0117] The unique definition of each character is as follows: The horizontal two-dimensional coordinates (x-axis, y-axis) of the sampling point in the point cloud coordinate system are the second coordinates of the sampling point. The horizontal two-dimensional coordinates (x-axis, y-axis) of the first coordinate of the sampling point in the real coordinate system; These are linear transformation parameters, which control the rotation, scaling, and shearing transformations of the coordinates, respectively. These are translation parameters, controlling the coordinate translation in the x-axis and y-axis directions respectively.
[0118] Converting the above two-dimensional affine transformation model into matrix form makes it easier to solve for the parameters using the least squares method. The matrix expression is as follows:
[0119] The unique definition of each character is consistent with the algebraic expression. The left side of the matrix is the column vector in the real coordinate system, the first 3×3 matrix on the right is the affine transformation matrix, and the second column vector on the right is the column vector in the point cloud coordinate system.
[0120] S1303: Using the first coordinate as the target value and the second coordinate as the input value, substitute them into the affine transformation model, and use the least squares method to solve for the linear transformation parameters and translation parameters that minimize the transformation error.
[0121] Specifically, the horizontal two-dimensional coordinates of the second coordinates of the 20 sampling points are... As the model input value, the corresponding horizontal two-dimensional coordinate of the first coordinate. As the target value of the model, it is substituted into the algebraic expression of the two-dimensional affine transformation in turn to form an overdetermined system of equations containing 20 sets of equations.
[0122] The least squares method is used to solve this overdetermined system of equations. The core objective is to find a set of linear transformation parameters. Translation parameters This minimizes the overall error between the calculated transformation values of all sampling points and the actual target values. This error is the sum of the squares of the transformation errors of each sampling point, ensuring that the solved parameters can be adapted to the coordinate transformation of the entire park.
[0123] The solution process was completed on the Ubuntu 22.04 operating system, using open-source libraries such as Python's NumPy and Open3D for numerical computation to ensure efficiency and accuracy, ultimately yielding a unique set of linear transformation parameters. Translation parameters .
[0124] S1304: The linear transformation parameters and the translation parameters are used to form an affine transformation matrix, which serves as the transformation matrix from the point cloud coordinate system to the real coordinate system.
[0125] Specifically, the linear transformation parameters obtained by solving the least squares method will be... Translation parameters Substituting these values into the matrix form of a two-dimensional affine transformation, we construct a 3×3 affine transformation matrix. This matrix represents the transformation from the point cloud coordinate system to the real coordinate system, denoted as [matrix]. .
[0126] Transformation matrix The specific expression is:
[0127] The unique definition of each character is as follows: Let be the affine transformation matrix from the point cloud coordinate system (pcd) to the real coordinate system (cm); For linear transformation parameters (rotation, scaling, shearing); The translation parameters are (x-axis, y-axis); the last row [0,0,1] in the matrix is a fixed row for affine transformation, ensuring the homogeneity of the coordinate transformation.
[0128] The transformation matrix is a unique solution that can realize the horizontal two-dimensional coordinate transformation from the point cloud coordinate system to the real coordinate system with minimal error. In this scheme, after transformation by this matrix, the average error in the horizontal direction is reduced to 0.591m and the standard deviation of the registration error is reduced to 0.59m, which meets the accuracy requirements of autonomous driving in the park.
[0129] In an optional implementation, see Figure 14 As shown, Figure 14 The flowchart of a target high-precision map generation method provided in Embodiment 1 of this application is shown, wherein the step of using the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate the target high-precision map includes steps S1401~S1403: S1401: Obtain the vehicle pose at the start of simultaneous localization and mapping, and construct a first transformation matrix from the vehicle body coordinate system to the real coordinate system based on the vehicle pose.
[0130] Specifically, the simultaneous localization and mapping (SMR) start time is the initial moment when the vehicle begins mapping in the Carla Simulator. The vehicle's pose at this moment is its pose in the Carla Map coordinate system (the real coordinate system), denoted as... The unique definition of each character is: The three-dimensional position coordinates (translation) of the vehicle in the real coordinate system. The quaternion components (rotation) of the vehicle in the real coordinate system are given by: , used for transformations of rotation matrices.
[0131] The first transformation matrix is a 4×4 homogeneous transformation matrix, denoted as... , by rotation matrix Translation vector The structure, expressed as a matrix, is as follows:
[0132] The unique definition of each character is as follows: This is the first transformation matrix from the vehicle body coordinate system to the real coordinate system at the initial moment; It is a 3×3 rotation matrix, obtained by transforming the quaternion components of the vehicle pose; It is a 3×1 translation vector, consisting of the three-dimensional position coordinates of the vehicle pose; 0 is a 1×3 zero vector; the last element 1 is a fixed value of the homogeneous transformation.
[0133] Specifically, rotation matrix quaternion components The converted result has the following specific expression:
[0134] The unique definition of each character is as follows: It is a 3×3 rotation matrix; The quaternion imaginary component represents the vehicle pose. The quaternion real component represents the vehicle pose.
[0135] Translation vector It consists of the three-dimensional position coordinates of the vehicle's pose, and its specific expression is: for The unique definition of each character is: It is a 3×1 translation vector; The coordinates are the three-dimensional position coordinates of the vehicle in the real coordinate system.
[0136] S1402: Use the first transformation matrix to transform the vector map from the point cloud coordinate system to the vehicle body coordinate system at the starting time, and complete the initial alignment based on the starting pose.
[0137] Specifically, since the installation position of the LiDAR in the vehicle coordinate system is [0, 0, 2.4, 0, 0, 0], and the origin of the point cloud coordinate system coincides with the installation position of the LiDAR, the vector map first needs to be converted from the point cloud coordinate system. Axis coordinate transformation, i.e., transformation of all points Axis coordinate execution -2.4 operation, eliminating the impact of lidar installation height The axis coordinate deviation completes the initial coordinate correction from the point cloud coordinate system to the vehicle body coordinate system.
[0138] Will The coordinates of all points on the vector map after axis coordinate transformation are converted to homogeneous coordinate form, denoted as . The unique definition of each character is: These are the homogeneous coordinates of the vector map points in the vehicle coordinate system at the initial moment; 1 represents the three-dimensional position coordinates of the vector map point in the vehicle body coordinate system at the initial moment; 1 is a fixed value for homogeneous coordinates.
[0139] homogeneous coordinates Substitute into the first transformation matrix Complete the transformation of the vector map from the point cloud coordinate system to the vehicle body coordinate system at the starting time. The transformation formula is: The unique definition of each character is: These are the homogeneous coordinates of vector map points in the real coordinate system; This is the first transformation matrix; The vector map points are represented by their homogeneous coordinates in the vehicle's coordinate system at the initial moment. This transformation achieves the initial alignment of the vector map with the real coordinate system, allowing the vector map's pose to match the vehicle's pose at the start of SLAM.
[0140] S1403: Using the transformation matrix, the initially aligned vector map is transformed from the vehicle coordinate system at the starting time to the real coordinate system. The vector map is then deformed and its coordinates are unified using the transformation matrix to generate the target high-precision map.
[0141] Specifically, the initially aligned vector map has completed the transformation from the point cloud coordinate system to the vehicle body coordinate system at the initial moment, and its coordinates are horizontal two-dimensional coordinates in the vehicle body coordinate system. Substitute the coordinates into the affine transformation matrix obtained in step S604. This completes the horizontal two-dimensional coordinate transformation from the vehicle coordinate system to the real coordinate system (Carla Map coordinate system).
[0142] The formula for coordinate transformation is:
[0143] The unique definition of each character is as follows: The horizontal two-dimensional coordinates of a point on a vector map in the real coordinate system; Let be the affine transformation matrix from the point cloud coordinate system to the real coordinate system; These are the horizontal two-dimensional coordinates of the vector map points in the vehicle body coordinate system.
[0144] Affine transformation matrix While completing coordinate transformation, it can effectively correct the global point cloud deformation generated during SLAM mapping (this deformation will be inherited by the vector map). Through linear transformation and translation transformation, it can eliminate the nonlinear deformation of the vector map and make the geometry of the vector map consistent with the actual park road structure.
[0145] After coordinate transformation and deformation correction, the generated high-precision target map is in Lanet2 format. Its coordinate system is the real coordinate system (actual mapping can be converted to UTM, national coordinate system or park-defined coordinate system). The average horizontal error is reduced to 0.591m, and the standard deviation of the registration error is reduced to 0.59m, with centimeter-level accuracy. It contains complete semantic information such as lanes, traffic lights, stop lines, and pedestrian crossings, and can be directly deployed to the control system of autonomous vehicles in the park to support precise vehicle positioning, path planning and decision-making.
[0146] See Figure 15 As shown, Figure 15 This diagram illustrates a visualization of a coordinate system transformation provided in Embodiment 1 of this application. The diagram shows the visualization effect of coordinate system transformation after coordinate correction: the horizontal axis is labeled "X coordinate", the vertical axis is labeled "Y coordinate", and the legend includes three types of data points: "Coordinate system A (blue), Coordinate system B (red), and Transformed (green)". The data points in the diagram are distributed in the range of X coordinate 0~400 and Y coordinate -400~100. Coordinate system A (blue) represents the point cloud coordinate system, coordinate system B (red) represents the real coordinate system (Carla Map coordinate system), and transformed (green) represents the coordinate points after correction by the affine transformation matrix. The transformed points almost coincide with the points in coordinate system B, which intuitively verifies the effectiveness of the coordinate transformation method.
[0147] See Figure 16 As shown, Figure 16 This diagram illustrates the distribution of sampling point correction errors provided in Embodiment 1 of this application. The diagram shows the distribution of coordinate correction errors for 20 sampling points. The horizontal axis is labeled "Point Index" (range 0.0~20.0), and the vertical axis is labeled "Error" (range 0.0~10.0 and above). The legend includes blue bars (correction errors for each sampling point) and a red dashed line (labeled "Average Error: 0.5951"). The diagram shows the distribution of coordinate correction errors for 20 sampling points, with the errors at each point fluctuating around an average error of 0.5951m. This visually demonstrates the accuracy level of coordinate correction, proving that the affine transformation matrix solved by the least squares method can effectively correct the global deformation caused by SLAM mapping, enabling the high-precision map to meet the centimeter-level accuracy requirements of autonomous driving in the park.
[0148] Example 2 See Figure 17 As shown, Figure 17 This illustration shows a structural schematic diagram of a high-precision map building device provided in Embodiment 2 of this application, wherein the device includes: The sensor data recording module 1701 is used to configure a vehicle equipped with sensors in a simulation platform, control the vehicle to drive along a preset trajectory in a preset park scene and record sensor data, wherein the preset trajectory includes a path design for enhancing loop closure detection constraints. The global point cloud map generation module 1702 is used to play back the recorded sensor data at a playback speed lower than the real-time acquisition speed, and use the simultaneous localization and mapping algorithm to perform offline mapping and generate a global point cloud map. The vector map drawing module 1703 is used to filter the global point cloud map, apply coordinate system transformation to the filtered global point cloud map, and draw a vector map containing road semantic information based on the processed global point cloud map. The sampling point coordinate determination module 1704 is used to set multiple sampling points in the park scene, obtain the first coordinates of each sampling point in the real coordinate system, and obtain the second coordinates of each sampling point in the point cloud coordinate system by registering the sensor data at the sampling point with the processed global point cloud map. The high-precision map generation module 1705 is used to calculate the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first coordinate and the second coordinate of multiple sampling points, and to use the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a target high-precision map.
[0149] In an optional implementation, the offline mapping using a simultaneous localization and mapping (SMR) algorithm to generate a global point cloud map includes: The replayed sensor data is input into the Cartographer algorithm; Local sub-maps are constructed based on sensor data between adjacent frames through front-end scanning matching using the Cartographer algorithm. The local subgraph is submitted to the backend graph optimization of the Cartographer algorithm. The backend graph optimization is used to perform global optimization of the pose constraints between multiple local subgraphs to eliminate accumulated errors. The global point cloud map is generated based on the optimized local sub-map and pose information.
[0150] In an optional implementation, applying a coordinate system transformation to the filtered global point cloud map includes: Obtain the filtered global point cloud map; Determine the grid reference system and its grid identifiers used by the map drawing platform; Based on the position coordinates of the simultaneous positioning and mapping starting point in the grid reference system, calculate the offset from the starting point to the origin corresponding to the grid identifier; The bias is applied to the filtered global point cloud map so that the biased global point cloud map is adapted to the coordinate range of the grid reference system.
[0151] In an optional implementation, the step of drawing a vector map containing road semantic information based on the processed global point cloud map includes: Obtain the processed global point cloud map; The processed global point cloud map is loaded into the vector map drawing platform as a base map reference for visualization; In the vector map drawing platform, the road structure presented by the loaded global point cloud map is used as a visual reference to identify and depict lane boundary lines, traffic light positions, stop lines and pedestrian crossing outlines, and generate a vector map containing semantic information of lanes, traffic lights, stop lines and pedestrian crossings.
[0152] In an optional implementation, the step of registering the sensor data at the sampling points with the processed global point cloud map to obtain the second coordinates of each sampling point in the point cloud coordinate system includes: At the sampling point, a point cloud frame collected by the lidar mounted on the vehicle is acquired; A point cloud registration algorithm is used to perform feature matching between the point cloud frame and the processed global point cloud map to obtain the matching position of the point cloud frame in the processed global point cloud map. The position coordinates of the sampling point in the point cloud coordinate system are determined based on the matching position, and used as the second coordinates.
[0153] In an optional implementation, calculating the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first and second coordinates of multiple sampling points includes: Obtain the first coordinates of multiple sampling points in the real coordinate system and the second coordinates in the point cloud coordinate system; Construct an affine transformation model that includes linear transformation parameters and translation parameters; Using the first coordinate as the target value and the second coordinate as the input value, we substitute them into the affine transformation model and use the least squares method to solve for the linear transformation parameters and translation parameters that minimize the transformation error. The linear transformation parameters and the translation parameters are used to construct an affine transformation matrix, which serves as the transformation matrix from the point cloud coordinate system to the real coordinate system.
[0154] In an optional implementation, the step of using the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a high-precision target map includes: Obtain the vehicle pose at the start of simultaneous localization and mapping, and construct a first transformation matrix from the vehicle coordinate system to the real coordinate system at the start of the mapping based on the vehicle pose. The vector map is transformed from the point cloud coordinate system to the vehicle body coordinate system at the starting time using the first transformation matrix, thus completing the initial alignment based on the initial pose; The vector map, after initial alignment, is transformed from the vehicle coordinate system at the initial moment to the real coordinate system using the transformation matrix. The vector map is then deformed and its coordinates are unified using the transformation matrix to generate the target high-precision map.
[0155] Example 3 Based on the same application concept, see [link / reference] Figure 18 As shown, Figure 18 This illustration shows a structural schematic diagram of a computer device provided in Embodiment 3 of this application, wherein, as shown... Figure 18 As shown, the computer device 1800 provided in Embodiment 3 of this application includes: The computer device 1800 includes a processor 1801, a memory 1802, and a bus 1803. The memory 1802 stores machine-readable instructions that can be executed by the processor 1801. When the computer device 1800 is running, the processor 1801 and the memory 1802 communicate through the bus 1803. When the machine-readable instructions are executed by the processor 1801, the steps of the high-precision map construction method shown in Embodiment 1 are performed.
[0156] Example 4 Based on the same concept, this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the high-precision map construction method described in any of the above embodiments.
[0157] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0158] The computer program product for high-precision map construction provided in this application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0159] The high-precision map building device provided in this application embodiment can be specific hardware on a device or software or firmware installed on the device. The implementation principle and technical effects of the device provided in this application embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0160] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0161] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0162] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0163] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0164] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0165] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.
Claims
1. A method for constructing high-precision maps, characterized in that, The method includes: In a simulation platform, a vehicle equipped with sensors is configured, and the vehicle is controlled to drive along a preset trajectory in a preset park scene and record sensor data. The preset trajectory includes a path design to enhance loop closure detection constraints. The recorded sensor data is played back at a speed lower than the real-time acquisition speed, and offline mapping is performed using a simultaneous localization and mapping algorithm to generate a global point cloud map. The global point cloud map is filtered, and a coordinate system transformation is applied to the filtered global point cloud map. Based on the processed global point cloud map, a vector map containing road semantic information is drawn. Multiple sampling points are set in the park scene, the first coordinates of each sampling point in the real coordinate system are obtained, and the second coordinates of each sampling point in the point cloud coordinate system are obtained by registering the sensor data at the sampling points with the processed global point cloud map. Based on the first and second coordinates of multiple sampling points, a transformation matrix from the point cloud coordinate system to the real coordinate system is calculated, and the vector map is subjected to coordinate transformation and deformation correction using the transformation matrix to generate a high-precision target map.
2. The method of claim 1, wherein, The offline mapping using a simultaneous localization and mapping (SMR) algorithm to generate a global point cloud map includes: The replayed sensor data is input into the Cartographer algorithm; Local sub-maps are constructed based on sensor data between adjacent frames through front-end scanning matching using the Cartographer algorithm. The local subgraph is submitted to the backend graph optimization of the Cartographer algorithm. The backend graph optimization is used to perform global optimization of the pose constraints between multiple local subgraphs to eliminate cumulative errors. The global point cloud map is generated based on the optimized local sub-map and pose information.
3. The method of claim 1, wherein, The process of applying coordinate system transformation to the filtered global point cloud map includes: Obtain the filtered global point cloud map; Determine the grid reference system and its grid identifiers used by the map drawing platform; Based on the position coordinates of the simultaneous positioning and mapping starting point in the grid reference system, calculate the offset from the starting point to the origin corresponding to the grid identifier; The bias is applied to the filtered global point cloud map so that the biased global point cloud map is adapted to the coordinate range of the grid reference system.
4. The method of claim 1, wherein, The process of drawing a vector map containing road semantic information based on the processed global point cloud map includes: Obtain the processed global point cloud map; The processed global point cloud map is loaded into the vector map drawing platform as a base map reference for visualization; In the vector map drawing platform, the road structure presented by the loaded global point cloud map is used as a visual reference to identify and depict lane boundary lines, traffic light positions, stop lines and pedestrian crossing outlines, and generate a vector map containing semantic information of lanes, traffic lights, stop lines and pedestrian crossings.
5. The method of claim 1, wherein, The step of registering the sensor data at the sampling points with the processed global point cloud map to obtain the second coordinates of each sampling point in the point cloud coordinate system includes: At the sampling point, a point cloud frame collected by the lidar mounted on the vehicle is acquired; A point cloud registration algorithm is used to perform feature matching between the point cloud frame and the processed global point cloud map to obtain the matching position of the point cloud frame in the processed global point cloud map. The position coordinates of the sampling point in the point cloud coordinate system are determined based on the matching position, and used as the second coordinates.
6. The method of claim 1, wherein, The step of calculating the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first and second coordinates of multiple sampling points includes: Obtain the first coordinates of multiple sampling points in the real coordinate system and the second coordinates in the point cloud coordinate system; Construct an affine transformation model that includes linear transformation parameters and translation parameters; Using the first coordinate as the target value and the second coordinate as the input value, we substitute them into the affine transformation model and use the least squares method to solve for the linear transformation parameters and translation parameters that minimize the transformation error. The linear transformation parameters and the translation parameters are used to construct an affine transformation matrix, which serves as the transformation matrix from the point cloud coordinate system to the real coordinate system.
7. The method according to claim 1, characterized in that, The step of using the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a high-precision target map includes: Obtain the vehicle pose at the start of simultaneous localization and mapping, and construct a first transformation matrix from the vehicle coordinate system to the real coordinate system at the start of the mapping based on the vehicle pose. The vector map is transformed from the point cloud coordinate system to the vehicle body coordinate system at the starting time using the first transformation matrix, thus completing the initial alignment based on the initial pose; The vector map, after initial alignment, is transformed from the vehicle coordinate system at the initial moment to the real coordinate system using the transformation matrix. The vector map is then deformed and its coordinates are unified using the transformation matrix to generate the target high-precision map. 8.A high-definition map construction apparatus, characterized by comprising: The device includes: The sensor data recording module is used to configure a vehicle equipped with sensors in a simulation platform, control the vehicle to drive along a preset trajectory in a preset park scene and record sensor data, wherein the preset trajectory includes a path design for enhancing loop closure detection constraints. The global point cloud map generation module is used to play back the recorded sensor data at a playback speed lower than the real-time acquisition speed, and use the simultaneous localization and mapping algorithm to perform offline mapping and generate a global point cloud map. The vector map drawing module is used to filter the global point cloud map, apply coordinate system transformation to the filtered global point cloud map, and draw a vector map containing road semantic information based on the processed global point cloud map. The sampling point coordinate determination module is used to set multiple sampling points in the park scene, obtain the first coordinates of each sampling point in the real coordinate system, and obtain the second coordinates of each sampling point in the point cloud coordinate system by registering the sensor data at the sampling point with the processed global point cloud map. The high-precision map generation module is used to calculate the transformation matrix from the point cloud coordinate system to the real coordinate system based on the first coordinate and the second coordinate of multiple sampling points, and to use the transformation matrix to perform coordinate transformation and deformation correction on the vector map to generate a target high-precision map.
9. A computer device, comprising: include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the high-precision map construction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the high-precision map construction method as described in any one of claims 1 to 7.