An AGV intelligent mapping method, device and medium based on a SLAM algorithm

CN121740005BActive Publication Date: 2026-08-07ANHUI HELI YUFENG INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANHUI HELI YUFENG INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-01-04
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]因此,本发明提供了一种基于SLAM算法的AGV智能建图方法解决跨关键帧环境的高精度定位表达不足及回环检测可靠性低问题

Benefits of technology

[0035]本发明有益效果为:通过跨关键帧观测关系计算结构稳定性指数场,实现了对环境结构的时序一致性刻画,提升了初始地图的结构可靠性,并结合关键帧位姿变化量与重复结构锚记生成回环约束集合,在复杂工业场景中保持地图拓扑的一致性与完整性,实现了AGV导航的高精度定位。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121740005B_ABST
    Figure CN121740005B_ABST
Patent Text Reader

Abstract

The application discloses an AGV intelligent mapping method and device based on a SLAM algorithm, and relates to the technical field of intelligent mapping.The method comprises the following steps: according to a key frame local submap, multiple observations in multiple frames of observation grid maps are accumulated, a structure stability index is calculated, and a structure stability index field is obtained; according to the structure stability index field, stability checking is performed on the multiple frames of observation grid maps, and an initial global map is generated by fusing the key frame local submap; loop detection is performed based on the initial global map, a loop constraint set is obtained, global re-optimization is performed through a SLAM algorithm, and an AGV environment map is generated.The application calculates a structure stability index field through cross-key frame observation relations, generates a loop constraint set in combination with a key frame pose change amount and a repeated structure anchor, and realizes high-precision positioning of AGV navigation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent mapping technology, and in particular to an AGV intelligent mapping method, device and medium based on the SLAM algorithm. Background Technology

[0002] With the rapid popularization of intelligent logistics, flexible manufacturing, and automated warehousing systems, the demand for autonomous navigation and path planning by Automated Guided Vehicles (AGVs) in complex industrial environments is increasing. Early SLAM algorithms often relied on single sensors; for example, LiDAR SLAM primarily achieved environmental geometry modeling through scan matching, while visual SLAM constructed sparse or semi-dense maps through feature extraction and 3D reconstruction. With the development of sensor fusion technologies such as IMU, odometer, and LiDAR, the accuracy and robustness of AGV environmental mapping have improved. Simultaneously, technologies such as grid mapping, sub-map fusion, and factor graph optimization have matured, enabling high-precision positioning in large-scale SLAM mapping scenarios.

[0003] Existing SLAM-based AGV mapping methods suffer from two main shortcomings in industrial scenarios: First, when handling multiple observations across keyframes, they often employ simple hit counting or point cloud fusion strategies, making it difficult to effectively distinguish between stable structures and regions affected by dynamic occlusion. This leads to local distortions or unstable geometric representations during the initial map construction stage. Second, most existing loop closure detection methods rely on single geometric matching or pose graph optimization, making it difficult to maintain effective loop closure recognition in highly similar scenarios such as repetitive structures, long corridors, and stacked goods. This often results in false triggers or missed triggers, preventing global optimization from accurately recovering the environmental topology. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an AGV intelligent mapping method based on the SLAM algorithm to solve the problems of insufficient high-precision positioning representation and low reliability of loop closure detection in cross-keyframe environments.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides an intelligent mapping method for AGVs based on the SLAM algorithm, comprising: acquiring sensor extrinsic parameter datasets and obtaining sensor frame sequences through preprocessing; performing pose calculations using the SLAM algorithm based on the sensor frame sequences to generate keyframe local sub-maps and record keyframe coverage information to obtain multi-frame observation grid maps; calculating a structural stability index and obtaining a structural stability index field by accumulating multiple observations in the multi-frame observation grid maps based on the keyframe local sub-maps; performing stability checks on the multi-frame observation grid maps based on the structural stability index field and fusing the keyframe local sub-maps to generate an initial global map; performing loop closure detection based on the initial global map to obtain a set of loop closure constraints, and performing global re-optimization using the SLAM algorithm to generate an AGV environment map.

[0008] As a preferred embodiment of the AGV intelligent mapping method based on SLAM algorithm described in this invention, the sensor extrinsic parameter dataset includes lidar extrinsic parameters, IMU extrinsic parameters, and odometer extrinsic parameters;

[0009] The preprocessing includes time synchronization, coordinate system transformation, and motion distortion correction.

[0010] As a preferred embodiment of the AGV intelligent mapping method based on SLAM algorithm described in this invention, the sensor frame sequence includes lidar point cloud data, IMU inertial measurement data, and odometer driving data.

[0011] The process of generating keyframe local sub-maps based on sensor frame sequences and using the SLAM algorithm to perform pose calculations involves the following steps:

[0012] Based on the sensor frame sequence, the SLAM algorithm is used to perform frame-by-frame pose calculation to obtain the continuous frame pose sequence;

[0013] Extract keyframe poses from a continuous frame pose sequence and combine them with the sensor frame sequence to form a keyframe dataset.

[0014] Based on the keyframe dataset, the keyframe pose and LiDAR point cloud data are projected onto a unified map coordinate system to generate a local sub-map of the keyframe.

[0015] As a preferred embodiment of the AGV intelligent mapping method based on the SLAM algorithm described in this invention, the specific steps for acquiring multi-frame observation raster images are as follows:

[0016] The local sub-map of the keyframe is projected into a two-dimensional grid space, and the keyframe hit number and hit count are recorded to generate keyframe coverage information.

[0017] Based on keyframe coverage information, multi-frame observation raster maps are generated through cross-keyframe accumulation.

[0018] As a preferred embodiment of the SLAM-based intelligent mapping method for AGVs described in this invention, the specific steps for calculating the structural stability index and obtaining the structural stability index field by accumulating multiple observations in the multi-frame observation grid map based on the local sub-map of the key frame are as follows.

[0019] Extract the cumulative hit count and grid number from the multi-frame observation raster image, arrange them in chronological order, and generate a cross-keyframe observation sequence;

[0020] Based on cross-keyframe observation sequences, the geometric distribution of point clouds is read sequentially according to grid number in the local sub-map of the keyframe to generate observation statistics.

[0021] Based on the observed statistical data, the structural stability index is calculated and stored in a one-to-one correspondence with the grid number to obtain the structural stability index field.

[0022] As a preferred embodiment of the AGV intelligent mapping method based on the SLAM algorithm described in this invention, the steps of performing stability checks on multi-frame observed raster maps according to the structural stability index field and fusing keyframe local sub-maps to generate an initial global map are as follows:

[0023] Based on the structural stability index field and multi-frame observation grid map, the structural stability index and cumulative hit count are read according to the grid number to obtain the grid stability description dataset.

[0024] Based on the raster stability description dataset, the stability scores are calculated and the raster numbers are sorted to obtain a stable raster number sequence;

[0025] Based on the raster number sequence, map data is extracted from the local sub-map of the keyframe and filled grid by grid until all grids are covered to generate the initial global map.

[0026] As a preferred embodiment of the SLAM-based intelligent mapping method for AGVs described in this invention, the specific steps for performing loop closure detection based on the initial global map to obtain a set of loop closure constraints are as follows:

[0027] Based on the initial global map and keyframe poses, candidate keyframes are extracted from the keyframe sequence in chronological order to generate a list of candidate keyframe pairs.

[0028] Based on the keyframe poses of candidate keyframe pairs, the pose change is statistically analyzed, and the repeating structural anchors recorded in the local sub-map of the keyframes are combined to obtain the set of closure constraints.

[0029] As a preferred embodiment of the SLAM-based intelligent mapping method for AGVs according to the present invention, the specific steps for generating the AGV environment map are as follows:

[0030] Based on the set of closure constraints and keyframe poses, the poses of all keyframes are adjusted using the SLAM algorithm to generate a re-optimized keyframe pose sequence.

[0031] Based on the re-optimized keyframe pose sequence, the local sub-maps of the keyframes are reprojected onto a unified coordinate system and fused according to the time sequence of the keyframes to generate a global map layout.

[0032] Perform a consistency check on the global map layout and gradually fill in the map content according to spatial coordinates to generate an AGV environment map.

[0033] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the AGV intelligent mapping method based on the SLAM algorithm as described in the first aspect of the present invention.

[0034] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the AGV intelligent mapping method based on the SLAM algorithm as described in the first aspect of the present invention.

[0035] The beneficial effects of this invention are as follows: by calculating the structural stability index field through cross-keyframe observation relationships, the temporal consistency of the environmental structure is achieved, improving the structural reliability of the initial map. Furthermore, by combining the pose change of keyframes with repeated structural anchors to generate a closure constraint set, the consistency and integrity of the map topology are maintained in complex industrial scenarios, thus achieving high-precision positioning for AGV navigation. Attached Figure Description

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

[0037] Figure 1 This is a flowchart of an AGV intelligent mapping method based on the SLAM algorithm.

[0038] Figure 2 A flowchart for obtaining multi-frame observation raster images.

[0039] Figure 3 A flowchart for obtaining the structural stability index field.

[0040] Figure 4 A flowchart for generating an AGV environment map. Detailed Implementation

[0041] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0042] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0043] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0044] Reference Figures 1-4 This is one embodiment of the present invention, which provides an AGV intelligent mapping method based on the SLAM algorithm, including the following steps:

[0045] S1: Collect sensor extrinsic parameter datasets and obtain sensor frame sequences through preprocessing.

[0046] S1.1: The sensor extrinsic parameter dataset includes lidar extrinsic parameters, IMU extrinsic parameters, and odometer extrinsic parameters;

[0047] Specifically, using the selected reference point and reference direction for the installation of the lidar on the AGV body as a benchmark, the distance values ​​of the lidar mounting base in the front-back direction, left-right direction and height direction, as well as the orientation angle of the lidar front, are recorded by measuring tools. The position parameters and orientation parameters are then compiled and registered as lidar external parameters.

[0048] Using the reference plane and reference axis of the IMU fixed inside or on top of the AGV body as a reference, the position values ​​of the IMU installation center in the front-back direction, left-right direction and height direction are recorded, and the installation attitude of the IMU in the roll, pitch and yaw directions is recorded according to the coordinate direction marks on the IMU housing. The position parameters and attitude parameters are organized and registered as IMU external parameters.

[0049] Install the odometer near the axle of the drive or driven wheel, and use the axle center position and AGV forward direction as a reference. Record the distance between the odometer installation point and the axle center using a measuring tool to obtain the position parameter. Read the angle information between the measurement direction marked on the odometer housing and the AGV forward direction to obtain the direction parameter. Record the wheel diameter parameter. Organize and register the position parameter, direction parameter, and wheel diameter parameter as the odometer external parameters.

[0050] S1.2: Preprocessing includes time synchronization, coordinate system transformation, and motion distortion correction;

[0051] Specifically, a time stamp is recorded for each ranging result of the lidar, and the time stamp is converted into a unified time scale through time synchronization. Under the unified time scale, the lidar extrinsic parameters recorded in the sensor extrinsic parameter dataset are used to perform coordinate system transformation on each ranging result, transforming the ranging result from the lidar installation coordinate system to the AGV body coordinate system. Based on the attitude and displacement changes reflected by the IMU inertial measurement data and odometer driving data, the ranging results collected at different times within the same frame are corrected in chronological order, and the lidar point cloud data is obtained.

[0052] When collecting IMU extrinsic parameters from the IMU output, a time stamp is recorded for each IMU output. The IMU time stamp is then aligned with a unified time scale through time synchronization. Under the unified time scale, the IMU extrinsic parameters recorded in the sensor extrinsic parameter dataset are used to perform coordinate system transformation on the position and attitude parameters, transforming the IMU inertial measurement data from the IMU installation coordinate system to the AGV body coordinate system, resulting in IMU inertial measurement data with consistent time sequence and unified coordinate expression.

[0053] A time tag is attached to each recorded odometer extrinsic parameter, and the time tag is matched with a unified time scale through time synchronization. Based on the odometer extrinsic parameters, the position parameters, direction parameters, and wheel diameter parameters are converted from the measurement direction near the odometer installation position to the forward and lateral directions in the AGV body coordinate system, and accumulated to form odometer driving data.

[0054] The lidar point cloud data, IMU inertial measurement data, and odometer driving data are aligned according to time labels on a unified time scale. The lidar point cloud data, IMU inertial measurement data, and odometer driving data corresponding to the same time position are combined into a group to obtain the sensor frame sequence.

[0055] S2: Based on the sensor frame sequence, pose calculation is performed using the SLAM algorithm to generate local sub-maps of key frames, and key frame coverage information is recorded to obtain multi-frame observation grid maps.

[0056] S2.1: Based on the sensor frame sequence, perform frame-by-frame pose calculation using the SLAM algorithm to obtain a continuous frame pose sequence;

[0057] Specifically, under a unified time scale, each group of sensor frames consisting of lidar point cloud data, IMU inertial measurement data, and odometer driving data is read sequentially according to the time label order in the sensor frame sequence.

[0058] The initial pose is obtained by using the position and attitude of the first set of sensor frames in the AGV body coordinate system. When processing the next set of sensor frames, the attitude change information reflected in the IMU inertial measurement data and the displacement change information reflected in the odometer driving data are combined to obtain the initial pose change of the current position relative to the previous position. Using the initial pose change as the alignment basis, the lidar point cloud data corresponding to the previous position and the lidar point cloud data corresponding to the current position are rotated to increase the spatial overlap of the two sets of lidar point cloud data in the AGV body coordinate system, thus obtaining the corrected pose change. The corrected pose change is combined with the position and attitude of the previous position in the AGV body coordinate system to obtain the position and attitude of the current position in the AGV body coordinate system, and the current position and attitude are recorded as the continuous frame pose corresponding to the current position.

[0059] By sequentially recording the pose of each consecutive frame at each time position in the sensor frame sequence according to the time tag order, a continuous frame pose sequence is obtained.

[0060] It should be noted that the SLAM algorithm utilizes LiDAR point cloud data, IMU inertial measurement data, and odometer driving data to solve the position and attitude changes of the AGV in a unified map coordinate system by matching the observations of adjacent time and position sensors during the AGV's movement. The observation information of each time position is projected to form a continuously expanding environmental map, and when a set of loop constraints is detected, the pose of all consecutive frames is globally re-optimized to suppress cumulative errors, thus enabling the AGV to achieve real-time localization and mapping synchronously in unknown or semi-unknown environments.

[0061] S2.2: Extract the keyframe poses from the continuous frame pose sequence and combine them with the sensor frame sequence to form a keyframe dataset;

[0062] Specifically, in the continuous frame pose sequence, the pose of each time position is traversed sequentially according to the time label order; the time difference between adjacent time labels in the sensor frame sequence is counted, and the time difference with the most occurrences is taken as the sampling period of the LiDAR point cloud data; the corresponding time position is selected from the continuous frame pose sequence according to an integer multiple of the LiDAR point cloud data sampling period as the time position of the key frame.

[0063] Based on the time position of the key frame, the system searches for lidar point cloud data, IMU inertial measurement data, and odometer driving data that match the time position of the key frame in the sensor frame sequence, and uses the pose of the continuous frames corresponding to the time position of the key frame as the key frame pose.

[0064] The keyframe pose, along with the lidar point cloud data, IMU inertial measurement data, and odometer driving data from the sensor frame sequence, are stored together as a set of keyframe associated records. All keyframe associated records are then arranged sequentially according to their time tags to form a keyframe dataset.

[0065] S2.3: Based on the keyframe dataset, project the keyframe pose and LiDAR point cloud data onto a unified map coordinate system to generate a local sub-map of the keyframe.

[0066] Specifically, each keyframe dataset is read in chronological order according to the time tag, and the position coordinates and attitude angles in the keyframe pose, as well as the LiDAR point cloud data corresponding to the keyframe pose, are extracted from the keyframe association records.

[0067] Using the position coordinates and attitude angles in the keyframe pose as the basis for coordinate transformation, the coordinates of the LiDAR point cloud data in the AGV body coordinate system are transformed into the unified map coordinate system through rotation (causing the LiDAR point cloud to rotate as a whole without deformation) and translation (simultaneously increasing the same displacement value in the front-back, left-right, and height directions), thus obtaining the spatial range around the keyframe expressed in the unified map coordinate system.

[0068] In a unified map coordinate system, using the position coordinates in the keyframe pose as the center, the distances of each point cloud coordinate relative to the keyframe position coordinates in the front-back, left-right, and height directions are calculated. Only point cloud coordinates whose distances in the front-back, left-right, and height directions are all within the spatial range surrounding the keyframe are retained. These retained point cloud coordinates are used as point cloud data covering the spatial range surrounding the keyframe. The selected point cloud data is stored according to the keyframe time label to generate a local sub-map of the keyframe.

[0069] S2.4: Project the local sub-map of the keyframe into the two-dimensional grid space, and record the keyframe hit number and hit count to generate keyframe coverage information;

[0070] Specifically, the planar coordinate range is divided at equal intervals in the front-back and left-right directions of the local sub-map of the keyframe, forming a two-dimensional grid space composed of multiple rectangular grids, and each rectangular grid is assigned a unique grid number.

[0071] Read the point cloud coordinates in the local sub-map of each keyframe sequentially according to the time tag order, and record the raster number corresponding to the location of each point cloud coordinate. Record the raster number and the number of the current keyframe in the keyframe dataset together as a hit record, and record the corresponding hit count when the same keyframe and the same raster number combination occurs repeatedly. Classify and organize the hit records according to the raster number to obtain the correspondence between the keyframe hit number and the hit count for each raster number. Summarize the correspondence between all raster numbers and keyframe hit numbers and hit counts to generate keyframe coverage information.

[0072] S2.5: Based on keyframe coverage information, multi-frame observation raster maps are generated through cross-keyframe accumulation.

[0073] Specifically, the keyframe hit number and hit count corresponding to each grid number in the keyframe coverage information are read according to the grid number. The total number of keyframe hits belonging to the same grid number is counted according to the keyframe hit number to obtain the cumulative number of hits for each grid number under cross-keyframe observation.

[0074] In the two-dimensional raster space, using the raster number as an index, each raster number and its corresponding cumulative hit count are written into the raster at the same position in the two-dimensional raster space, forming a raster observation result containing the raster number and the cumulative hit count; all raster observation results are arranged according to the planar coordinates of the two-dimensional raster space, and multi-frame observation raster maps are generated under a unified map coordinate system with the raster number and the cumulative hit count as the content.

[0075] S3: Based on the local sub-map of the key frame, accumulate multiple observations in the multi-frame observation raster map, calculate the structural stability index, and obtain the structural stability index field.

[0076] S3.1: Extract the cumulative hit count and grid number from the multi-frame observation raster map, arrange them in chronological order, and generate a cross-keyframe observation sequence;

[0077] Specifically, the cumulative hit count of each grid number recorded in the multi-frame observation raster map at different keyframe time positions is extracted. Based on the keyframe time label, all grid numbers in the multi-frame observation raster map are read sequentially from morning to evening according to the time label.

[0078] Based on the raster number, the cumulative hit count at each keyframe time position is read and organized according to the keyframe time labels from early to late. The time label sequence corresponding to each raster number and the cumulative hit count sequence are combined into a group and stored together with the raster number to form a cross-keyframe observation sequence with the raster number as the index and the time label sequence and cumulative hit count sequence as the content.

[0079] It should be noted that the cross-keyframe observation sequence is used to organize the cumulative number of hits of the same raster number on different keyframe time labels into a traceable sequence according to the time label, thereby providing a unified input for subsequent statistical analysis of point cloud geometric distribution and calculation of structural stability index according to raster number across time.

[0080] S3.2: Based on the cross-keyframe observation sequence, the geometric distribution of point cloud is read sequentially according to the grid number in the local sub-map of the keyframe to generate observation statistics.

[0081] Specifically, the time label sequence corresponding to each grid number in the cross-keyframe observation sequence is read sequentially according to the grid number order; in the keyframe local sub-map, the keyframe local sub-map corresponding to the time label is searched sequentially according to the time label, and the point cloud coordinates falling within the grid position range are read in each keyframe local sub-map; using the planar coordinates of the grid center as the reference, the planar distance from each point cloud coordinate to the grid center is calculated, and all planar distances are combined into a point cloud distance set; the average value of the point cloud distance set is used as the average point cloud distance corresponding to the current time label, the maximum value of the point cloud distance set is used as the maximum point cloud distance corresponding to the current time label, and the minimum value of the point cloud distance set is used as the minimum point cloud distance corresponding to the current time label. The number of points is taken as the number of elements in the point cloud distance set, and the average point cloud distance, maximum point cloud distance, minimum point cloud distance, and number of points are registered together with the time label as geometric distribution features.

[0082] The geometric distribution features corresponding to each raster number are combined and organized according to the time label order and stored using the raster number as an index to generate observation statistics.

[0083] S3.3: Based on the observed statistical data, calculate the structural stability index and store it in one-to-one correspondence with the grid number to obtain the structural stability index field.

[0084] Specifically, the number of point clouds, the average point cloud distance, and the difference between the maximum and minimum point cloud distances corresponding to each grid number in the observation statistics are read sequentially according to the grid number order. These are used as the observation statistics to calculate the structural stability index, expressed as:

[0085] ;

[0086] in, It is the structural stability index. For the number of point clouds, Using distance as the scale, This represents the average point cloud distance. This represents the average number of point clouds. The maximum value in the point cloud distance. It is the minimum value among the point cloud distances.

[0087] The distance scale is the side length of a single rectangular grid cell in the two-dimensional grid space, ranging from the minimum to the maximum side length used when dividing the two-dimensional grid space (for example, in indoor shelf aisles, workstation boundaries, and narrow aisle alignment scenarios, the distance scale parameter is 0.05m or 0.10m; in outdoor park roads, open area navigation, long corridors, and other large-scale navigation scenarios, the distance scale parameter is 0.50m or 1.00m).

[0088] Specifically, the structural stability index is a dimensionless quantity. The point cloud quantity-related terms are made dimensionless by comparing them with the average point cloud quantity, and the point cloud distance-related terms are made dimensionless by comparing them with the distance scale parameter of the same dimension. Therefore, the overall formula has a unified dimension.

[0089] Each grid number and its corresponding structural stability index are combined and stored as a set of index records. Based on the grid number's position in the two-dimensional grid space, the structural stability index value is written into the grid cell in the two-dimensional grid space that corresponds to the grid number's position, under a unified map coordinate system, to obtain the structural stability index field.

[0090] Better yet, by calculating the structural stability index, the geometric distribution of point clouds and the cumulative number of hits corresponding to the observation sequence across key frames are uniformly compressed into a single discriminant for each grid number. This facilitates subsequent stability checks and sorting of grid numbers based on the structural stability index field, prioritizing the selection of grid positions with consistent structure and reliable coverage for initial global map filling, and reducing the impact of dynamic objects, occlusion changes, and local mismatches on the coherence of the global map layout.

[0091] S4: Perform stability checks on the multi-frame observation raster map based on the structural stability index field, and fuse the local sub-maps of key frames to generate an initial global map.

[0092] S4.1: Based on the structural stability index field and multi-frame observation grid map, read the structural stability index and cumulative hit count according to the grid number to obtain the grid stability description dataset;

[0093] Specifically, based on the structural stability index field, the structural stability index corresponding to each grid number and the cumulative number of hits corresponding to each grid number in the multi-frame observation grid map are recorded.

[0094] The structural stability index at each grid number position is read sequentially in the structural stability index field according to the grid number order, and the cumulative hit count at the same grid number position is read in the multi-frame observation grid map. The grid number, structural stability index and cumulative hit count are combined into a stable description record. Stable description records are continuously added in the order of grid number. The grid stable description dataset is obtained by using the grid number as the index and the structural stability index and cumulative hit count as the content.

[0095] S4.2: Based on the raster stability description dataset, calculate the stability score, sort the raster numbers, and obtain the stable raster number sequence;

[0096] Specifically, the raster number, structural stability index, and cumulative hit count are read sequentially from each stable description record in the raster stable description dataset according to the raster number order; a stability score is calculated based on the structural stability index and cumulative hit count; the stability score and raster number are registered together as an expanded stable description record; after the stability score calculation is completed for all raster numbers, the expanded stable description records are sorted in descending order of stability score; the sorted raster numbers are read sequentially according to the sorting result, and the sorted raster numbers are arranged in order to obtain the stable raster number sequence.

[0097] The expression for calculating the stability score is:

[0098] ;

[0099] in, For stability rating, This represents the maximum value of the structural stability index. This represents the minimum value of the structural stability index. To accumulate hit counts, This represents the maximum cumulative number of hits. This represents the minimum number of cumulative hits.

[0100] Specifically, the structural stability index is a dimensionless quantity and the cumulative hit count is a count. After being normalized to the maximum and minimum value intervals, it is converted into a dimensionless quantity. The stability score is the product of two dimensionless quantities, and therefore it is a dimensionless quantity.

[0101] Better yet, by calculating the structural stability index, the fluctuations in the geometric distribution of the point cloud corresponding to the cross-keyframe observation sequence and the degree of coverage repetition reflected by the multi-frame observation raster map are uniformly compressed into a single discriminant corresponding to each raster number. This allows the structural stability index field to be directly used as the reference basis for subsequent stability checks, raster number sorting, and grid-by-grid filling of the initial global map, thereby improving the spatial coherence and re-optimization of the initial global map.

[0102] S4.3: Extract map data from the local sub-map of the keyframe according to the grid number sequence, and fill it grid by grid until all grids are covered to generate the initial global map.

[0103] Specifically, under a unified map coordinate system, each grid number is read sequentially according to the grid number sequence, and the corresponding grid position is determined in the two-dimensional grid space using the grid number. Records with the same grid number as the current grid number are searched in the cross-keyframe observation sequence, and a list of keyframe time labels corresponding to the current grid number is obtained from the cross-keyframe observation sequence. Based on the keyframe time label list, the corresponding keyframe associated records are searched in the keyframe dataset, and the keyframe local sub-map is read from the keyframe associated records. Point cloud data falling within the grid position range corresponding to the current grid number are extracted from the keyframe local sub-map. For each candidate point cloud data, the structural stability index corresponding to the current grid number is read from the structural stability index field, and the stability score corresponding to the current grid number is read from the grid stability description dataset. The candidate point cloud data are sorted in descending order of stability score, and the candidate point cloud data with the highest score is selected as the map data corresponding to the current grid number.

[0104] The selected map data is written into the initial global map at the position consistent with the current grid number; under the unified map coordinate system, the map data is filled along the grid number sequence to generate the initial global map.

[0105] S5: Perform loop closure detection based on the initial global map, obtain the set of loop closure constraints, and perform global re-optimization through the SLAM algorithm to generate the AGV environment map.

[0106] S5.1: Based on the initial global map and keyframe poses, extract candidate keyframes in the keyframe sequence in chronological order and generate a list of candidate keyframe pairs;

[0107] Specifically, each keyframe pose record in the continuous frame pose sequence is read sequentially according to the time tag order, and the position coordinates are read from each keyframe pose record. The corresponding grid position is located in the initial global map using the planar coordinates of the position coordinates in the unified map coordinate system as an index. The keyframe pose records are traversed in the order of the time tags, and the keyframe pose corresponding to the current time tag is paired with the keyframe pose corresponding to the subsequent time tags one by one. During each pairing, the grid positions corresponding to the two keyframe poses are read and compared, and the two keyframes with the same grid position are selected as candidate keyframe pairs.

[0108] Record the time tag, keyframe pose, and grid position of a candidate keyframe pair as a candidate keyframe pair record; append and arrange all candidate keyframe pair records sequentially according to the time tag order to generate a candidate keyframe pair list.

[0109] S5.2: Based on the keyframe pose of candidate keyframe pairs, the pose change is statistically analyzed, and the repeated structural anchors recorded in the local sub-map of the keyframe are combined to obtain the set of closure constraints.

[0110] Specifically, each candidate keyframe pair record in the candidate keyframe pair list is read sequentially according to the time tag order, and the position coordinates and attitude angles in the keyframe pose are extracted respectively; under the unified map coordinate system, the coordinate values ​​of the corresponding position coordinates of the two keyframe poses in the front-back direction, left-right direction, and height direction are read respectively, and the difference between the two values ​​in the same direction is taken as the displacement change; the difference of the corresponding attitude angles of the two keyframe poses is taken as the attitude change; the displacement change and attitude change are combined to form the pose change corresponding to the candidate keyframe pair record.

[0111] Using the time labels in the candidate keyframe records as the retrieval basis, the keyframe association records with the same time labels are searched in the keyframe dataset and the corresponding keyframe local sub-maps are read. In the keyframe local sub-maps, the point cloud coordinate distribution falling within the grid position range is read grid by grid in the order of grid number in the two-dimensional grid space. Geometric arrangement segments that appear repeatedly in both the front-back and left-right directions in the point cloud coordinate distribution are marked as repeating structure anchors.

[0112] Store the repeating structural anchors together with the grid number positions in the candidate keyframe pair records as the structural constraint descriptions corresponding to the candidate keyframe pair records; summarize the time tag, keyframe pose, pose change, repeating structural anchors and structural constraint descriptions corresponding to each candidate keyframe pair record to obtain the closure constraint set.

[0113] S5.3: Based on the closure constraint set and keyframe poses, adjust all keyframe poses using the SLAM algorithm to generate a re-optimized keyframe pose sequence;

[0114] Specifically, each loop constraint record is read sequentially according to the time label order recorded in the loop constraint set, and the corresponding candidate keyframe pair record's time label, keyframe pose, pose change, and repeated structural anchors and structural constraint descriptions are extracted from the loop constraint record; all keyframe associated records are read in the keyframe dataset according to the time label order, and the keyframe pose in each keyframe associated record is extracted to form a keyframe pose sequence that corresponds one-to-one with the time label.

[0115] In the keyframe pose sequence, the difference between the poses of keyframes with adjacent time tags is used as the continuous constraint term; the pose change and structural constraint description corresponding to each loop constraint record in the loop constraint set are used as the loop constraint term; the continuous constraint term and the loop constraint term are written together into the SLAM algorithm, and the repeated structural anchors are applied to the loop constraint terms according to the grid number position corresponding to the repeated structural anchors in the loop constraint set. When the repeated structural anchors are consistent with the point cloud geometric distribution of the local sub-map of the keyframe, all keyframe poses are adjusted; the updated keyframe poses corresponding to each time tag are arranged continuously in the order of time tags from early to late to generate the re-optimized keyframe pose sequence.

[0116] S5.4: Based on the re-optimized keyframe pose sequence, the local sub-maps of the keyframes are reprojected onto a unified coordinate system and fused according to the time sequence of the keyframes to generate a global map layout.

[0117] Specifically, the process involves sequentially reading each re-optimized keyframe pose record in the re-optimized keyframe pose sequence according to the time label; using the time label as the retrieval basis, searching for keyframe association records with the same time label in the keyframe dataset, and reading the keyframe local sub-map and LiDAR point cloud data; using the position coordinates and attitude angles in the re-optimized keyframe pose record as the basis for coordinate transformation; rotating or translating the LiDAR point cloud data in the keyframe local sub-map to transform the LiDAR point cloud data from the AGV body coordinate system to a unified map coordinate system, thus obtaining the reprojected keyframe local sub-map.

[0118] Read the grid position range covered by the reprojected keyframe local sub-map based on the grid number in the two-dimensional grid space; traverse the reprojected keyframe local sub-map in the order of the time label of the re-optimized keyframe pose sequence from early to late; extract the point cloud data falling within the grid position range in the order of grid number in each traversal, and append it to the corresponding grid number position of the global map layout to generate the global map layout.

[0119] S5.5: Perform a consistency check on the global map layout and gradually fill in the map content according to spatial coordinates to generate an AGV environment map.

[0120] Specifically, the point cloud data stored at each grid number position in the global map layout is read sequentially according to the planar coordinate order of the two-dimensional grid space; the point cloud data corresponding to the adjacent grid number positions are read sequentially, and the point cloud coordinates near the two sides of the boundary are compared. The spatial continuity is determined by statistically analyzing the connection between the point cloud coordinates on both sides of the adjacent boundary. For example, if the point cloud coordinates of the right boundary of the preceding grid number and the left boundary of the following grid number can form a continuous wall or ground edge under the unified map coordinate system, and the corresponding point cloud coordinates on both sides of the boundary do not have a break zone in the boundary direction and maintain the same direction, then the spatial continuity is determined to be valid.

[0121] The cumulative hit counts and keyframe hit numbers corresponding to adjacent raster numbers are read sequentially. Within the same set of keyframe hit numbers, the changing trends of the cumulative hit counts on both sides are compared. The matching degree of the coverage frequency distribution on both sides is statistically analyzed, and coverage consistency is determined accordingly. For example, if adjacent raster numbers share the same keyframe hit number order in the keyframe hit number set, and the corresponding cumulative hit counts increase or decrease in the same direction with the keyframe hit number, maintaining the same high-low relationship at each keyframe hit number, then coverage consistency is determined. The spatially continuous and coverage-consistent raster number positions are used as the list of raster numbers to be completed.

[0122] According to the planar coordinate order of the list of raster numbers to be completed in the two-dimensional raster space, the corresponding raster positions are located one by one; based on the point cloud data of the adjacent raster number positions in the global map layout, the boundary adjacent point clouds are extracted and spatial coordinate alignment is performed to generate the completed point cloud data of the raster number positions to be completed; the completed point cloud data is written into the raster position in the global map layout that matches the raster number to be completed, and is summarized grid by grid according to the planar coordinate order of the two-dimensional raster space; the point cloud data of all raster number positions in the global map layout are gradually filled in according to the spatial coordinates to form the complete map content, generating the AGV environment map.

[0123] This embodiment also provides a computer device applicable to the AGV intelligent mapping method based on the SLAM algorithm, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the AGV intelligent mapping method based on the SLAM algorithm proposed in the above embodiment.

[0124] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0125] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the AGV intelligent mapping method based on the SLAM algorithm proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0126] In summary, this invention achieves temporal consistency characterization of environmental structures by calculating the structural stability index field across keyframe observation relationships, thereby improving the structural reliability of the initial map. Furthermore, by combining keyframe pose changes with repeated structural anchors to generate a closure constraint set, the consistency and integrity of map topology are maintained in complex industrial scenarios, thus achieving high-precision positioning for AGV navigation.

[0127] Specifically, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An AGV intelligent mapping method based on a SLAM algorithm, characterized in that: include, Collect sensor extrinsic parameter datasets and obtain sensor frame sequences through preprocessing; Based on the sensor frame sequence, pose calculation is performed using the SLAM algorithm to generate local sub-maps of key frames, and key frame coverage information is recorded to obtain multi-frame observation grid maps. Based on the local sub-map of the keyframe, multiple observations are accumulated in the multi-frame observation raster map to calculate the structural stability index and obtain the structural stability index field. The specific steps are as follows. Extract the cumulative hit count and grid number from the multi-frame observation raster image, arrange them in chronological order, and generate a cross-keyframe observation sequence; Based on cross-keyframe observation sequences, the geometric distribution of point clouds is read sequentially according to grid number in the local sub-map of the keyframe to generate observation statistics. Based on the observed statistical data, the structural stability index is calculated and stored in a one-to-one correspondence with the grid number to obtain the structural stability index field. Stability checks are performed on the multi-frame observation raster map based on the structural stability index field, and the local sub-maps of keyframes are fused to generate an initial global map. The specific steps are as follows. Based on the structural stability index field and multi-frame observation grid map, the structural stability index and cumulative hit count are read according to the grid number to obtain the grid stability description dataset. Based on the raster stability description dataset, calculate the stability score and sort the raster numbers to obtain the stable raster number sequence; Based on the raster number sequence, map data is extracted from the local sub-map of the keyframe and filled cell by cell until all rasters are covered to generate the initial global map; Based on the initial global map, loop closure detection is performed to obtain the set of loop closure constraints, and the global re-optimization is performed using the SLAM algorithm to generate the AGV environment map. 2.The AGV intelligent mapping method based on a SLAM algorithm according to claim 1, wherein: The sensor extrinsic parameter dataset includes lidar extrinsic parameters, IMU extrinsic parameters, and odometer extrinsic parameters; The preprocessing includes time synchronization, coordinate system transformation, and motion distortion correction. 3.The AGV intelligent mapping method based on a SLAM algorithm according to claim 2, characterized in that: The sensor frame sequence includes lidar point cloud data, IMU inertial measurement data, and odometer driving data; The process of generating keyframe local sub-maps based on sensor frame sequences and using the SLAM algorithm to perform pose calculations involves the following steps: Based on the sensor frame sequence, the SLAM algorithm is used to perform frame-by-frame pose calculation to obtain the continuous frame pose sequence; Extract keyframe poses from a continuous frame pose sequence and combine them with the sensor frame sequence to form a keyframe dataset. Based on the keyframe dataset, the keyframe pose and LiDAR point cloud data are projected onto a unified map coordinate system to generate a local sub-map of the keyframe.

4. The AGV intelligent mapping method based on SLAM algorithm as described in claim 3, characterized in that: The specific steps for obtaining multi-frame observation raster images are as follows. The local sub-map of the keyframe is projected into a two-dimensional grid space, and the keyframe hit number and hit count are recorded to generate keyframe coverage information. Based on keyframe coverage information, multi-frame observation raster maps are generated through cross-keyframe accumulation.

5. The AGV intelligent mapping method based on SLAM algorithm as described in claim 1, characterized in that: The process of performing loop closure detection based on the initial global map to obtain the loop closure constraint set involves the following steps: Based on the initial global map and keyframe poses, candidate keyframes are extracted from the keyframe sequence in chronological order to generate a list of candidate keyframe pairs. Based on the keyframe poses of candidate keyframe pairs, the pose change is statistically analyzed, and the repeating structural anchors recorded in the local sub-map of the keyframes are combined to obtain the set of closure constraints.

6. The AGV intelligent mapping method based on SLAM algorithm as described in claim 5, characterized in that: The specific steps for generating the AGV environment map are as follows. Based on the set of closure constraints and keyframe poses, the poses of all keyframes are adjusted using the SLAM algorithm to generate a re-optimized keyframe pose sequence. Based on the re-optimized keyframe pose sequence, the local sub-maps of the keyframes are reprojected onto a unified coordinate system and fused according to the time sequence of the keyframes to generate a global map layout. Perform a consistency check on the global map layout and gradually fill in the map content according to spatial coordinates to generate an AGV environment map.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the AGV intelligent mapping method based on the SLAM algorithm as described in any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the AGV intelligent mapping method based on the SLAM algorithm as described in any one of claims 1 to 6.