A mobile robot online mapping method based on point cloud grid
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UQI TECH CO LTD
- Filing Date
- 2026-06-17
- Publication Date
- 2026-08-07
AI Technical Summary
[0005]本发明的目的在于克服上述现有技术的问题,提供了一种基于点云栅格的移动机器人在线建图方法,用于解决现有单一传感建图漂移畸变、多模块数据割裂、无自适应自愈建图机制、地图输出形式单一、工程落地适配性差的技术缺陷,提供一种基于点云栅格的移动机器人在线建图方法,以统一CloudInfo特征数据包作为全系统数据枢纽,融合激光、视觉、二维码多源约束,依托置信度驱动常规/临时双建图自适应切换,同步生成三维点云和二维栅格地图,兼顾在线实时建图与离线数据包回放建图,适配各类复杂工业厂房落地使用
[0016] The present invention provides an online mapping method for mobile robots based on point cloud grids. It achieves shared data sources for multiple modules by building a CyberRT distributed bus and a unified CloudInfo feature data package, realizes self-healing mapping in weak feature environments through a confidence-linked temporary mapping mechanism, suppresses robot positioning drift through multi-source constraint fusion of laser vision and QR codes, achieves integrated mapping and navigation data by reusing features to build dual-type maps in parallel, and realizes incremental map updates and cross-device map fusion in complex industrial scenarios through online and offline dual mapping management.
Smart Images

Figure CN122524072A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of SLAM mapping technology for mobile robots, and more particularly to an online mapping method for mobile robots based on point cloud grids. Background Technology
[0002] Currently, industrial mobile robots generally use single-laser SLAM for mapping. However, in industrial environments with weak features, such as long corridors, large open factory areas, and glass and stainless steel curtain walls, effective laser features are scarce, resulting in a decrease in the success rate of inter-frame and frame-to-frame map matching. Over long periods of robot movement, pose drift accumulates, easily leading to map distortion and loss of global localization. In traditional mapping systems, the laser mapping, visual mapping, QR code localization, and grid navigation map generation subsystems are independent, with inconsistent data formats, making it impossible to share point cloud feature data extracted from the front end. This results in high coupling between modules and poor scalability.
[0003] Existing conventional solutions lack a quantitative closed-loop control mechanism for positioning reliability. When positioning quality deteriorates, manual shutdown and remapping are required, resulting in low on-site construction efficiency. Most solutions can only output 3D point cloud maps or 2D raster maps separately, and cannot generate both types of maps simultaneously from a single data source. Furthermore, they lack online and offline dual mapping modes. In the event of network failures or equipment malfunctions, the mapping process cannot be reproduced offline using recorded data packets, making it difficult to implement engineering requirements such as regional incremental mapping, multi-robot map merging, and compatibility with third-party system maps. In some sparse scenarios, a large number of additional positioning accessories are required, resulting in high deployment costs.
[0004] Therefore, a new technical solution is urgently needed to solve the above-mentioned technical problems. Summary of the Invention
[0005] The purpose of this invention is to overcome the problems of the prior art and provide an online mapping method for mobile robots based on point cloud grids. This method addresses the technical shortcomings of existing single-sensor mapping, such as drift distortion, fragmented data from multiple modules, lack of adaptive and self-healing mapping mechanisms, limited map output formats, and poor adaptability to engineering applications. The invention provides an online mapping method for mobile robots based on point cloud grids, using a unified CloudInfo feature data package as the data hub for the entire system. It integrates multi-source constraints from laser, vision, and QR codes, and relies on confidence-driven adaptive switching between conventional and temporary mapping. It simultaneously generates 3D point cloud and 2D grid maps, accommodating both online real-time mapping and offline data package playback mapping, and is suitable for deployment in various complex industrial plants.
[0006] The above objectives are achieved through the following technical solutions: A method for online mapping of mobile robots based on point cloud grids, which relies on Apollo CyberRT middleware to build a distributed message bus to realize full-process module scheduling and communication, includes the following steps: S1. The lidar collects raw point cloud data of the environment. After performing coordinate transformation and filtering preprocessing on the raw point cloud, corner points, plane points, and reflection intensity feature points are extracted based on curvature calculation, and packaged to generate a CloudInfo feature point cloud data package in a unified format. S2. The CloudInfo feature point cloud data package is sent to the laser mileage calculation stage and the grid mapping stage respectively through a preset topic. Based on the LOAM algorithm, the two-dimensional or three-dimensional inter-frame matching mode is adaptively selected according to the number of radar beams to solve the inter-frame incremental mileage and output the laser mileage data. S3. Receive the laser mileage data and CloudInfo feature point cloud data packet to perform frame-to-map matching, and calculate the location confidence in real time based on the proportion of matched inliers. The matching confidence is calculated by converting the weighted inlier ratio (inlier_ratio2). The weighted inlier ratio is calculated by combining the intensity feature matching rate and the partition-weighted geometric feature matching rate: the numerator is the number of intensity feature matching points multiplied by the intensity weight plus the sum of the number of corner inliers and the number of planar inliers in the partition-weighted calculation; the denominator is the total number of intensity features multiplied by the intensity weight plus the sum of the total number of corner inliers and the total number of planar inliers in the partition-weighted calculation. Multiplying the weighted inlier ratio by 100 gives the location confidence percentage. Based on the confidence value, selectively perform regular global mapping or temporary local mapping, using Euclidean distance coarse screening combined with ICP fine matching two-level loop closure verification combined with GTSAM-ISAM2 incremental factor map optimization, and updating the global map pose with Ceres global trajectory alignment. S4. The vehicle-mounted camera collects environmental ground texture images, which are processed by GTSLAM to generate visual pose constraints. The global absolute pose is obtained through QR code image recognition, and the visual pose constraints and the global absolute pose are simultaneously sent to the map optimization stage to achieve multi-source constraint supplementation. S5. The raster mapping stage is based on the optimized Cartographer architecture, which accesses the CloudInfo feature point cloud data package to generate pbstream serialized map files and sub-map data. The three-dimensional point cloud map is generated by the map optimization unit of the laser mileage calculation stage based on the aggregation of global keyframe feature point clouds. The two-dimensional navigation raster map (OccupancyGrid) is generated by the map optimization unit based on the global point cloud map after filtering by the Z-axis range and then projecting. S6. The map management process aggregates all types of map data generated throughout the entire process, configures two operating modes: online real-time map building and offline data package playback map building, and completes map storage, incremental updates, multi-map fusion and alignment, and external distribution.
[0007] As a further optimization of this method, in step S1, each laser scanning line of the lidar is equally divided into six segments for sampling, distinguishing high curvature corner points, low curvature plane points, and feature points with reflection intensity exceeding the threshold. Simultaneously, multi-radar point cloud fusion, transformation of the radar coordinate system to the robot body base_link coordinate system, and dual filtering of angle and distance are realized, and invalid point cloud data that time out are directly discarded.
[0008] As a further optimization of this method, in step S2, the received CloudInfo feature point cloud data packets are first checked for data timeliness, and data packets with abnormal timing are removed. The first valid frame of data is used as the matching reference frame to match the generated laser mileage data, and the data is transmitted to the frame-to-map matching stage through the / iroll / laser_odom topic.
[0009] As a further optimization of this method, the frame-to-map matching process in step S3 sets a region-weighted matching strategy, with the weight of trusted region feature matching set to 2.0, the weight of ordinary region to 1.0, and the weight of invalid region to 0.5. The region-weighted matching strategy determines the region to which each feature point belongs based on the predefined coordinate range of trusted region (trust_areas) and invalid region (invalid_areas): if the point coordinates fall within the trusted region, a weight of 2.0 is assigned; if they fall within the invalid region, a weight of 0.5 is assigned; and otherwise, a standard weight of 1.0 is assigned. The range of each region is flexibly set according to the on-site environment through the configuration file. Keyframes are dynamically added based on the robot's movement displacement threshold, and keyframes are fully saved in mapping mode, while temporary keyframes are managed using a sliding window in positioning mode.
[0010] As a further optimization of this method, in step S3, when the location confidence is lower than the preset start threshold, temporary mapping is automatically started and a temporary map is independently constructed in the current local area; when the confidence is higher than the exit threshold and the number of temporary keyframes exceeds the sliding window limit value, the temporary map is automatically merged with the global main map to complete the local incremental update. The fusion process between the temporary map and the global main map includes: creating an independent ISAM2 optimizer for the temporary keyframe sequence, applying prior constraints and odometry constraints to complete local optimization; detecting duplicate keyframes in the main map frame by frame through KD-tree radius search; automatically removing redundant keyframes in the main map; overlaying the temporary point cloud and the main map point cloud to construct a fused local point cloud, completing redundant incremental fusion; loop closure detection in mapping mode adopts a two-level verification process of coarse screening with Euclidean distance combined with fine matching with ICP. First, candidate loop closure keyframes are screened by KD-tree radius search combined with time difference filtering, and then effective loop closure constraints are determined by ICP precise matching combined with fitness score threshold; in positioning mode, when the system loses positioning, the optimal matching frame is searched in the historical keyframe library through ScanContext global descriptor matching to achieve global repositioning initialization.
[0011] As a further optimization of this method, the GTSLAM in step S4 adopts a front-end and back-end separation architecture. The front-end generates real-time pose based on mileage and image anchor points, and the back-end completes image feature tracking and matching, configuring three working modes: mapping, localization, and incremental update. The global absolute pose obtained by QR code recognition provides a global coordinate reference to the laser odometry mapping stage and the visual texture mapping and localization stage under the conditions of mapping initialization, localization loss, and map calibration.
[0012] As a further optimization of this method, the raster mapping in step S5 is divided into two sub-steps: front-end local trajectory construction and back-end pose graph optimization. The front-end completes the scanning data filtering and sub-graph generation, while the back-end constructs the SPA (Sparse Pose Adjustment) constraint graph through the Ceres nonlinear optimization solver. The SPA is responsible for modeling the relative poses between sub-graphs as sparse constraints, and Ceres is responsible for performing numerical optimization on the constraint graph to achieve global constraint optimization. It supports switching between TSDF or probabilistic raster mapping modes as needed and generates pbstream serialized map files.
[0013] As a further optimization of this method, when playing back the offline data package for mapping, the full amount of sensor data package on site is recorded first, and the data package is imported into the offline environment to reproduce the entire process of online mapping. During the online mapping stage, the robot's driving speed and angular velocity are controlled within a limited range, and reflective pillars are deployed as needed to supplement the geometric features of the environment in open and weak feature scenes.
[0014] As a further optimization of this method, the walking route is planned according to the differences in scene size during mapping. For narrow corridors, a round-trip scan is used; for medium and large spaces, a U-shaped closed loop is used; and for super-large sites, 100m×100m blocks are divided for block closed loop mapping. The closed loop walking segment ensures that the repeated route meets the preset length requirements.
[0015] As a further optimization of this method, the map fusion in step S6 includes aligning the old and new maps, merging the mapping results of multiple robots, and interfacing with the map of a third-party navigation system. During map storage, keyframe point clouds, pose files, historical trajectories, and raster configuration files are saved simultaneously. Differential spatial sparsity processing is performed on keyframes during map storage: keyframe poses are retained at a first resolution for indoor areas, while outdoor areas are sampled sparsly at a second resolution (the second resolution is lower than the first resolution). Redundant keyframes are removed through overlap threshold detection, and the compressed poses.txt file and corresponding feature point cloud files are saved. The consistency of the incremental map before and after modification can be verified using third-party comparison tools.
[0016] The present invention provides an online mapping method for mobile robots based on point cloud grids. It achieves shared data sources for multiple modules by building a CyberRT distributed bus and a unified CloudInfo feature data package, realizes self-healing mapping in weak feature environments through a confidence-linked temporary mapping mechanism, suppresses robot positioning drift through multi-source constraint fusion of laser vision and QR codes, achieves integrated mapping and navigation data by reusing features to build dual-type maps in parallel, and realizes incremental map updates and cross-device map fusion in complex industrial scenarios through online and offline dual mapping management. Attached Figure Description
[0017] Figure 1 This is a flowchart of an online mapping method for mobile robots based on point cloud grids, as described in this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The described embodiments are merely some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] like Figure 1 As shown, this solution provides an online mapping method for mobile robots based on point cloud grids. It utilizes the Apollo CyberRT middleware to build a distributed message bus to achieve end-to-end module scheduling and communication, including the following steps: Step S1: The LiDAR collects raw point cloud data of the environment. After coordinate transformation and filtering preprocessing of the raw point cloud, corner points, plane points, and reflection intensity feature points are extracted based on curvature calculation. The data is then packaged into a CloudInfo feature point cloud data package in a unified format. Each laser scanning line is divided into six equal segments for sampling, distinguishing high curvature corner points, low curvature plane points, and reflection intensity feature points exceeding the threshold. Simultaneously, multi-radar point cloud fusion, radar coordinate system to robot body base_link coordinate system transformation, and angle and distance dual filtering are implemented. Invalid point cloud data that time out are directly discarded.
[0020] Step S2: The CloudInfo feature point cloud data packet is sent to the laser mileage calculation stage and the raster mapping stage respectively through a preset topic. Based on the LOAM algorithm, the two-dimensional or three-dimensional inter-frame matching mode is adaptively selected according to the number of radar beams to solve the inter-frame incremental mileage and output the laser mileage data. The received CloudInfo feature point cloud data packet is first checked for data timeliness, and data packets with abnormal time sequence are removed. The first valid data frame is used as the matching reference frame. The laser mileage data generated by the matching is transmitted to the frame to map matching stage through the / iroll / laser_odom topic.
[0021] Step S3: Receive laser mileage data and CloudInfo feature point cloud data packets to perform frame-to-map matching. Calculate the positioning confidence in real time based on the proportion of matched points. Selectively perform regular global mapping or temporary local mapping based on the confidence value. Utilize a two-level loop closure check combining Euclidean distance coarse screening and ICP fine matching, along with GTSAM-ISAM2 incremental factor map optimization. Update the global map pose using Ceres global trajectory alignment. During the frame-to-map matching process, set a region-weighted matching strategy: the weight for trusted region feature matching is set to 2.0, the weight for ordinary regions is 1.0, and the weight for invalid regions is 0.5. Keyframes are updated based on robot movement. The displacement threshold is dynamically added, distinguishing between full keyframe saving in mapping mode and temporary keyframe management using a sliding window in positioning mode. When the positioning confidence is lower than the preset start threshold, temporary mapping is automatically started, and a temporary map is independently built in the current local area. When the confidence is higher than the exit threshold and the number of temporary keyframes exceeds the limit of the sliding window, the temporary map is automatically merged with the global main map to complete the local incremental update. In mapping mode, loop closure detection adopts a two-level verification process of coarse screening with Euclidean distance and fine matching with ICP. First, candidate loop closure keyframes are screened by KD-tree radius search combined with time difference filtering, and then effective loop closure constraints are determined by ICP precise matching combined with fitness score threshold. In positioning mode, when the system loses positioning, the optimal matching frame is searched in the historical keyframe library through ScanContext global descriptor matching to achieve global repositioning initialization.
[0022] Step S4: The vehicle-mounted camera acquires environmental ground texture images, which are processed by GTSLAM to generate visual pose constraints. The global absolute pose is obtained through QR code image recognition. The visual pose constraints and the global absolute pose are simultaneously transmitted to the map optimization stage to supplement multi-source constraints. GTSLAM adopts a front-end and back-end separation architecture. The front-end generates real-time pose based on mileage and image anchor points, while the back-end completes image feature tracking and matching, and configures three working modes: mapping, localization, and incremental update. The global absolute pose obtained by QR code recognition provides a global coordinate reference to the laser odometer mapping stage and the visual texture mapping and localization stage under the conditions of mapping initialization, localization loss, and map calibration.
[0023] Step S5: The raster mapping stage, based on the optimized Cartographer architecture, accesses the CloudInfo feature point cloud data package to generate pbstream serialized map files and sub-map data. The 3D point cloud map is generated by the map optimization unit of the laser odometry calculation stage based on the aggregation of global keyframe feature point clouds. The 2D navigation raster map (OccupancyGrid) is generated by the map optimization unit based on the global point cloud map filtered by the Z-axis range and then projected. Raster mapping is divided into two sub-stages: front-end local trajectory construction and back-end pose map optimization. The front-end completes the scanning data filtering and sub-map generation. The back-end uses the Ceres nonlinear optimization solver to construct the SPA (Sparse Pose Adjustment) constraint map. SPA is responsible for modeling the relative poses between sub-maps as sparse constraints. Ceres is responsible for performing numerical optimization on the constraint map to achieve global constraint optimization. It supports switching between TSDF or probabilistic raster mapping modes as needed and generates pbstream serialized map files.
[0024] Step S6: The map management stage summarizes all types of map data generated throughout the entire process, configures two operating modes: online real-time mapping and offline data package playback mapping, and completes map storage, incremental updates, multi-map fusion and alignment, and external distribution. When playing back offline data packages for mapping, the entire set of sensor data packages is recorded first, and the data packages are imported into the offline environment to reproduce the entire online mapping process. During the online mapping stage, the robot's speed and angular velocity are controlled within a limited range. In open and weak feature scenes, reflective pillars are deployed as needed to supplement the geometric features of the environment. When mapping, the walking route is planned according to the differences in scene size. For narrow corridors, a round-trip scanning method is used; for medium and large spaces, a U-shaped closed loop is used; and for very large sites, 100m×100m blocks are divided for block closed-loop mapping. The closed-loop walking segment ensures that the repeated distance meets the preset length requirements. Map fusion includes aligning old and new maps, merging the mapping results of multiple robots, and connecting with third-party navigation system maps. When storing maps, keyframe point clouds, pose files, historical trajectories, and raster configuration files are saved simultaneously. Third-party comparison tools can be used to verify the consistency of incremental map modifications.
[0025] As a specific embodiment of this method, this embodiment selects a U600 AGV in a warehouse workshop for on-site implementation. The equipment is equipped with multi-line LiDAR, vehicle-mounted cameras, and pre-installed Apollo CyberRT middleware. The system operates according to the procedures outlined in the handover document. The first step is to collect the raw point cloud with LiDAR, divide the sampling interval into six equal parts according to each scan line, distinguish corner points and plane points based on the curvature formula, filter the reflective column features by combining the reflection intensity, and complete the multi-radar fusion, base_link coordinate transformation, distance and angle filtering, and then encapsulate the CloudInfo feature point cloud data package and distribute it through the / iroll / cloud_info topic. The second step is to verify the data packet timeout discard rule of the laser odometry unit, automatically select 2D or 3D LOAM matching according to the number of radar lines, and send the generated odometry data to the map optimization unit through / iroll / laser_odom. The third step, map optimization, uses Ceres to perform scan-to-map matching, configuring weighting coefficients of 2.0 for trusted areas, 1.0 for normal areas, and 0.5 for invalid areas. Confidence is calculated based on the ratio of matched intra-points. If the score is below the threshold, temporary map building is initiated. Once the target is met, the temporary map is merged into the main map. After KD-tree distance search and ICP two-level loopback verification, GTSAM-ISAM2 incremental factor map optimization is used. If location is lost, ScanContext global relocation is initiated. The fourth step is that GTSLAM adopts a front-end and back-end separation architecture, outputs visual constraints in three working modes: mapping, localization, and incremental. The QR code recognition results output the global absolute pose in the initialization, localization loss, and map calibration scenarios. Both types of constraints are simultaneously sent to the map optimization stage. Step 5: u_carto is based on the optimized Cartographer architecture. The front-end LocalTrajectoryBuilder2D generates subgraphs, and the back-end PoseGraph2D performs SPA constraint graph optimization through the Ceres solver. It generates TSDF or probabilistic raster subgraphs based on the same source CloudInfo and outputs pbstream serialized files. Step 6: The map management module adopts two modes: online real-time map building and offline recording and playback map building, according to the configuration disclosed. On-site, based on the width of the corridor and the size of the site, round-trip, square, and block mapping routes are selected. Sufficient overlapping mileage is reserved for closed loop sections. The alignment of old and new maps is completed, multi-vehicle map fusion is performed, and third-party map is connected. The map is saved as a complete set of files, including poses.txt, various point clouds, and historical trajectories. In case of failure, debug data packages can be recorded for offline review. Reflective pillars are added to sparse areas as needed to enhance features.
[0026] As an alternative implementation method for this embodiment: if there is a temporary power outage in the factory area during on-site construction, record the full amount of lidar, image, and IMU data packets in advance. Later, rely on the offline playback function of the office computer Ubuntu system to import the data packets to complete offline mapping, which is not limited by the on-site environment and hardware conditions.
[0027] As a fault adaptation explanation for this embodiment: In the case of sudden environmental changes caused by the opening and closing of roller shutter doors and automatic doors, the roller shutter doors should be kept open during the mapping operation to reduce feature changes caused by dynamic environmental changes; For areas with extremely scarce features and no continuous contours, a small number of reflective columns should be installed on site to supplement the points by relying on the reflection intensity features to improve the matching confidence.
[0028] The above description is merely illustrative of the embodiments of the present invention and is not intended to limit the present invention. For those skilled in the art, any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for online mapping of mobile robots based on point cloud grids, characterized in that, Includes the following steps: S1. The lidar collects raw point cloud data of the environment. After performing coordinate transformation and filtering preprocessing on the raw point cloud, corner points, plane points, and reflection intensity feature points are extracted based on curvature calculation and packaged to generate a CloudInfo feature point cloud data package in a unified format. S2. The CloudInfo feature point cloud data package is sent to the laser mileage calculation stage and the grid mapping stage respectively through a preset topic. Based on the LOAM algorithm, the two-dimensional or three-dimensional inter-frame matching mode is adaptively selected according to the number of radar beams to solve the inter-frame incremental mileage and output the laser mileage data. S3. Receive the laser mileage data and CloudInfo feature point cloud data packet to perform frame-to-map matching, calculate the location confidence in real time based on the proportion of points in the matching, and selectively perform regular global mapping or temporary local mapping according to the confidence value. Use Euclidean distance coarse screening combined with ICP fine matching two-level loop closure verification, GTSAM-ISAM2 incremental factor map optimization, and Ceres global trajectory alignment to update the global map pose. S4. The vehicle-mounted camera collects environmental ground texture images, which are processed by GTSLAM to generate visual pose constraints. The global absolute pose is obtained through QR code image recognition, and the visual pose constraints and the global absolute pose are simultaneously sent to the map optimization stage to achieve multi-source constraint supplementation. S5. The raster mapping stage is based on the optimized Cartographer architecture. It accesses the CloudInfo feature point cloud data package and generates pbstream serialized map files and sub-map data. Both the 3D point cloud map and the 2D navigation raster map are generated and published by the map optimization unit. S6. The map management process aggregates all types of map data generated throughout the entire process, configures two operating modes: online real-time map building and offline data package playback map building, and completes map storage, incremental updates, multi-map fusion and alignment, and external distribution.
2. The online mapping method for mobile robots based on point cloud grids according to claim 1, characterized in that, In step S1, each laser scanning line of the lidar is equally divided into six segments for sampling, distinguishing high curvature corner points, low curvature plane points, and feature points with reflection intensity exceeding the threshold. Simultaneously, multi-radar point cloud fusion, radar coordinate system to robot body base_link coordinate system transformation, and angle and distance dual filtering are realized, and invalid point cloud data that time out are directly discarded.
3. The online mapping method for mobile robots based on point cloud grids according to claim 1, characterized in that, In step S2, the received CloudInfo feature point cloud data packets are first checked for data timeliness, and data packets with abnormal timing are removed. The first valid data frame is used as the matching reference frame to match the generated laser mileage data, and the data is transmitted to the frame-to-map matching stage through the / iroll / laser_odom topic.
4. The online mapping method for mobile robots based on point cloud grids according to claim 1, characterized in that, In step S3, the frame-to-map matching process sets a region-weighted matching strategy, with the weight of trusted region feature matching set to 2.0, the weight of ordinary region set to 1.0, and the weight of invalid region set to 0.
5. The region-weighted matching strategy determines the region to which each feature point belongs based on the predefined coordinate range of trusted regions and the coordinate range of invalid regions: if the point coordinates fall within the trusted region, a weight of 2.0 is assigned; if they fall within the invalid region, a weight of 0.5 is assigned; and the rest are assigned a standard weight of 1.
0. The range of each region is flexibly set according to the on-site environment through the configuration file; keyframes are dynamically added based on the robot's movement displacement threshold, and keyframes are fully saved in the mapping mode, while temporary keyframes are managed using a sliding window in the positioning mode.
5. The online mapping method for mobile robots based on point cloud grids according to claim 4, characterized in that, In step S3, when the location confidence is lower than the preset start threshold, temporary mapping is automatically started, and a temporary map is independently constructed in the current local area. When the confidence is higher than the exit threshold and the number of temporary keyframes exceeds the sliding window limit, the temporary map is automatically merged with the global main map to complete the local incremental update. In the mapping mode, loop closure detection adopts a two-level verification process of coarse screening by Euclidean distance combined with fine matching by ICP. First, candidate loop closure keyframes are screened by KD-tree radius search combined with time difference filtering. Then, effective loop closure constraints are determined by ICP precise matching combined with fitness score threshold. In the positioning mode, when the system loses positioning, the optimal matching frame is searched in the historical keyframe library by ScanContext global descriptor matching to achieve global repositioning initialization.
6. The online mapping method for mobile robots based on point cloud grids according to claim 4, characterized in that, In step S4, GTSLAM adopts a front-end and back-end separation architecture. The front-end generates real-time pose based on mileage and image anchor points, while the back-end completes image feature tracking and matching, and configures three working modes: mapping, localization, and incremental update. The global absolute pose obtained by QR code recognition provides a global coordinate reference to the laser odometry mapping stage and the visual texture mapping and localization stage under the conditions of mapping initialization, localization loss, and map calibration.
7. The online mapping method for mobile robots based on point cloud grids according to claim 1, characterized in that, The raster mapping described in step S5 is divided into two sub-steps: front-end local trajectory construction and back-end pose graph optimization. The front-end completes the scanning data filtering and sub-graph generation, while the back-end constructs the SPA constraint graph through the Ceres nonlinear optimization solver. Among them, SPA is responsible for modeling the relative poses between sub-graphs as sparse constraints, and Ceres is responsible for performing numerical optimization on the constraint graph to achieve global constraint optimization. It supports switching between TSDF or probabilistic raster mapping modes as needed and generates pbstream serialized map files.
8. The online mapping method for mobile robots based on point cloud grids according to claim 1, characterized in that, When playing back the offline data package for mapping, the full set of sensor data packages on site are recorded first, and the data packages are imported into the offline environment to reproduce the entire online mapping process. During the online mapping stage, the robot's driving speed and angular velocity are controlled within a limited range, and reflective pillars are deployed as needed in open and weak feature scenes to supplement the geometric features of the environment.
9. The online mapping method for mobile robots based on point cloud grids according to claim 1, characterized in that, When mapping, walking routes are planned according to the differences in scene size. For narrow corridors, a round-trip scan is used; for medium and large spaces, a U-shaped closed loop is used; and for super large sites, 100m×100m blocks are divided for block closed loop mapping. The closed loop walking segments ensure that the repeated routes meet the preset length requirements.
10. The online mapping method for mobile robots based on point cloud grids according to claim 1, characterized in that, The map fusion in step S6 includes aligning the old and new maps, merging the mapping results of multiple robots, and connecting with the map of a third-party navigation system. When storing the map, keyframe point clouds, pose files, historical trajectories, and grid configuration files are saved simultaneously.