Indoor environment map establishing method and system based on Gmapping algorithm

By applying the Gmapping algorithm in an indoor environment, combining Bayesian filtering and particle filtering technology, the accuracy and reliability problems of indoor map generation are solved, and efficient navigation and positioning of robots indoors are realized.

CN120043523APending Publication Date: 2025-05-27YANCHENG INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510035233.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The prior art is difficult to achieve accurate and reliable indoor map generation, affecting the robot's automatic navigation and positioning indoors.

Method used

The indoor environment map construction method based on the Gmapping algorithm is adopted. By generating the initial map in the initialization stage and updating the map based on current and historical detection data in the update stage, the map is optimized by Bayesian filtering and particle filtering technology.

Benefits of technology

It realizes high-precision and high-reliability indoor map generation, supporting robots' precise navigation and positioning in complex indoor environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120043523A_ABST
    Figure CN120043523A_ABST
Patent Text Reader

Abstract

The invention provides an indoor environment map establishment method and system based on a Gmapping algorithm, and the method comprises the steps: inputting detection data into a Gmapping algorithm module in an initialization stage, and generating an initial map; in the updating and perfecting stage, a data stream is constructed based on the detection data at the current moment and the historical detection data, and the data stream is input into the Gmapping algorithm module to update the initial map. According to the indoor environment map establishment method and system based on the Gmapping algorithm, accurate and reliable indoor map generation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of indoor navigation and positioning, and particularly relates to a method and system for establishing an indoor environment map based on the Gmapping algorithm. Background Art

[0002] At present, with the development of intelligent robots and automation systems, they have been gradually applied to various fields of people's life and work. For example: guiding robots in hospitals, automatic navigation mobile vehicles in automated factories, etc.; in order to achieve the automatic navigation and movement of robots indoors, it mainly depends on their own ability to navigate and position indoors, and the indoor map generation technology is the core technical means of indoor navigation and positioning technology; how to achieve the generation of accurate and reliable indoor maps is the basis for accurate indoor navigation. Summary of the Invention

[0003] One of the purposes of the present invention is to provide a method and system for establishing an indoor environment map based on the Gmapping algorithm to achieve the generation of accurate and reliable indoor maps.

[0004] A method for establishing an indoor environment map based on the Gmapping algorithm provided by an embodiment of the present invention includes:

[0005] In the initialization stage, input the detection data into the Gmapping algorithm module to generate an initial map;

[0006] In the update and improvement stage, construct a data stream based on the detection data at the current moment and historical detection data and input the data stream into the Gmapping algorithm module to update the initial map.

[0007] Preferably, the steps for generating the initial map are as follows:

[0008] Construct a grid map and determine the initial positioning, and update the state of the grid cells in the grid map according to the initial positioning and detection data;

[0009] Among them, the grid map is composed of a plurality of grid cells densely arranged together.

[0010] Preferably, updating the state of the grid cells in the grid map according to the initial positioning and detection data includes:

[0011] Take the pre-correspondingly configured grid cell in the middle position of the grid map as the initial positioning position;

[0012] Based on the detection data, determine the grid cells corresponding to the boundary starting from the initial positioning position and update the state of the determined grid cells to occupied;

[0013] Update the status of grid cells between the initial positioning position and the grid cells with the status of occupied to idle;

[0014] Update the status of the remaining grid cells to idle.

[0015] Preferably, construct a data stream based on the detection data at the current moment and the historical detection data, and input the data stream into the Gmapping algorithm module to update the initial map, including:

[0016] Adopt the Bayesian filtering process, obtain the posterior probability distribution of the robot's position according to the sensor data, and update the map according to the result.

[0017] Preferably, the method for establishing an indoor environment map based on the Gmapping algorithm further includes:

[0018] In the initialization stage, extract the features from the detection data, and construct a sampling analysis set based on the extracted feature parameters;

[0019] Based on the sampling analysis set and the pre-configured sampling analysis library, determine the sampling particle data set;

[0020] Based on the sampling particle data set, perform particle sampling.

[0021] Preferably, the method for establishing an indoor environment map based on the Gmapping algorithm further includes:

[0022] In the update and improvement stage, when resampling is required, extract the features from the current detection data, and construct a sampling analysis set based on the extracted feature parameters;

[0023] Based on the sampling analysis set and the pre-configured sampling analysis library, determine the sampling particle data set;

[0024] Based on the sampling particle data set and other particles that do not require resampling, resample the particles that need to be resampled.

[0025] Preferably, based on the sampling particle data set and other particles that do not require resampling, resampling the particles that need to be resampled includes:

[0026] Parse the sampling particle data set to determine the total number of particles;

[0027] Based on the total number of particles and the number of other particles that do not require resampling, group the sampling particle data set;

[0028] Match the particles in each group with other particles that do not require resampling to determine the corresponding matching group;

[0029] Resampling is performed starting from the positions of other particles that do not require resampling, based on the positional relationship between the particles not included in the grouped particles and the particles included in the grouped particles in the sampled particle dataset.

[0030] Preferably, the method for establishing an indoor environment map based on the Gmapping algorithm further includes:

[0031] When updating the initial map, calculate the similarity between the currently generated map and the historically generated map;

[0032] When the similarity is less than or equal to the similarity threshold, discard the currently generated map without updating;

[0033] Among them, the similarity threshold is determined through the following steps:

[0034] Match the analysis sampling set corresponding to the currently generated map with the analysis sampling set corresponding to the previously generated map, and query the pre-configured threshold determination table according to the matching situation to determine the corresponding similarity threshold.

[0035] The present invention also provides an indoor environment map establishment system based on the Gmapping algorithm, including: an initial module and an update module; among them, in the initialization stage, the initial module inputs the detection data into the Gmapping algorithm module to generate an initial map; in the update and improvement stage, the update module constructs a data stream based on the detection data at the current moment and the historical detection data and inputs the data stream into the Gmapping algorithm module to update the initial map.

[0036] Preferably, the steps for generating the initial map are as follows:

[0037] Construct a grid map and determine the initial positioning, and update the states of the grid cells in the grid map according to the initial positioning and the detection data;

[0038] Among them, the grid map is composed of a plurality of grid cells densely arranged together.

[0039] Other features and advantages of the present invention will be described in the subsequent description, and, in part, will be obvious from the description, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written description and the drawings.

[0040] The technical solutions of the present invention will be further described in detail below through the drawings and embodiments. Description of the Drawings

[0041] The drawings are used to provide a further understanding of the present invention, and constitute a part of the description. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:

[0042] Figure 1 Schematic diagram of a method for establishing an indoor environment map based on the Gmapping algorithm in an embodiment of the present invention;

[0043] Figure 2 Schematic diagram of a grid map;

[0044] Figure 3 Step diagram of selective resampling;

[0045] Figure 4 Schematic diagram of a system for establishing an indoor environment map based on the Gmapping algorithm in an embodiment of the present invention. Detailed implementation manners

[0046] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0047] An embodiment of the present invention provides a method for establishing an indoor environment map based on the Gmapping algorithm, as Figure 1 shown, including:

[0048] Step 1: In the initialization stage, input the detection data into the Gmapping algorithm module to generate an initial map;

[0049] Step 2: In the update and improvement stage, construct a data stream based on the detection data at the current moment and historical detection data, and input the data stream into the Gmapping algorithm module to update the initial map.

[0050] Among them, the steps for generating the initial map are as follows:

[0051] Construct a grid map and determine the initial positioning. Update the status of the grid cells in the grid map according to the initial positioning and the detection data;

[0052] Among them, the grid map is composed of a plurality of grid cells densely arranged together;

[0053] Updating the status of the grid cells in the grid map according to the initial positioning and the detection data includes:

[0054] Take the pre-correspondingly configured grid cell in the middle position in the grid map as the initial positioning position;

[0055] Based on the detection data, determine the grid cells corresponding to the boundary starting from the initial positioning position, and update the status of the determined grid cells to occupied;

[0056] Update the status of grid cells between the initial positioning position and the grid cells with the status of occupied to idle;

[0057] Update the status of the remaining grid cells to idle.

[0058] As Figure 2 shown, the two main processes of generating a map are processing the data of the laser sensor and drawing a raster map. Before processing the laser sensor data, the original laser scan data needs to be whitened to eliminate the noise generated by sensor failures or external interferences. To ensure that the laser data collected at each point is aligned in the same coordinate system, data alignment is required. Finally, filtering is performed to smooth the data and eliminate irrelevant features before the next map drawing. The analyzed laser data will be converted into a raster map through the raster map laser data. This includes mapping the laser data onto the grid cells of the map and updating the corresponding grid cells according to the data attributes. Usually, the free area is represented by white grid cells, the obstacle area is represented by black grid cells, and the unknown area is represented by gray grid cells. The resolution and accuracy of the map depend on the size of the grid cells and the density of the laser data.

[0059] The environmental map m is divided into multiple grid blocks, that is, m = {m i}, and each grid block is independent of each other. Given the pose of the robot, the posterior probability of the occupancy grid map is p(m i |z 1:t , x 1:t ) is expressed using the product of marginal probabilities as:

[0060] p(m|z 1:t , x 1:t ) = ∏ i p(m i |z 1:t , x 1:t ).

[0061] Among them, the detection data is the laser sensor data; the laser sensor includes any one of a mechanical rotating lidar, a solid-state lidar, and Leishen Intelligent_C16;

[0062] Bayesian filtering is a crucial component in creating and updating maps for robot localization. To generate the posterior probability distribution of the robot's position based on sensor data, the Gmapping algorithm uses Bayesian filtering techniques to fuse the robot's kinematic model with the sensor data. This process is divided into two steps: prediction and update. In the prediction phase, the motion model is used to predict the robot's position. Then, in the update step, the posterior probability distribution of the robot's position is updated according to the sensor data, and the map is updated accordingly. The goal of map optimization is to improve the accuracy and quality of the map. This may include smoothing map boundaries, adding fillers where needed, removing noise, and correcting any errors. By using these optimization techniques, the map can better describe the real world, thus enhancing the robot's navigation and localization capabilities. The Bayesian formula is as follows:

[0063]

[0064] This equation can estimate the posterior probability using prior knowledge and infer based on causal relationships.

[0065] Laser sensor data processing, grid map construction, Bayesian filtering, and map optimization are the key steps in map construction of the Gmapping algorithm. These steps cooperate with each other to provide the robot with an accurate and reliable environmental map, providing important support for real-time localization and navigation.

[0066] Through this method, the Gmapping algorithm, taking advantage of the sophisticated design of RBPF, can effectively construct and update high-precision maps in a changing indoor environment, providing a solid foundation for autonomous navigation mobile robots.

[0067] The essence of SLAM lies in its iterative nature, where the robot continuously updates its position estimate and environmental map through the sensor data stream. In 3D space, this process can be represented as the following optimization problem:

[0068]

[0069] where x represents the sequence of robot positions, m is the environmental map, z i is the i-th observation, h is the observation model, and S i is the covariance matrix of the observation noise. By minimizing the observation residuals, the SLAM algorithm gradually converges to the optimal solution, that is, the most credible robot trajectory and environmental representation.

[0070] The Gmapping algorithm cleverly utilizes a filtering framework, especially the Extended Kalman Filter (EKF) or Particle Filter (PF), to handle this non-linear problem. It constructs a 2D grid map by scanning data while estimating the robot's position in the map. The advantage of Gmapping lies in its efficiency and robustness, providing stable performance even in cases of sparse or noisy sensor data.

[0071] To enable the robot to accurately estimate its position and update the map, the motion model and the localization algorithm are crucial for the map creation process. The motion model uses the robot's dynamics and control commands to predict the robot's future position and orientation, as well as its behavioral tendencies during task execution. The motion model is used to predict the robot's trajectory during mapping, providing prior information to help the robot more accurately estimate its position during map updates. Particle Filter is usually the basis of the localization algorithm in the Gmapping algorithm. It creates a set of randomly generated particles in the state space, updates the particles according to the observations of sensor data, and weights the particles to finally determine the estimated value of the robot's position. In this process, the map is an important reference point, and the weights of the particles will change according to the matching degree between the particle positions and the map, thereby improving the accuracy and consistency of the localization results.

[0072] Motion models can be divided into two categories: predictive motion models and feedback motion models. Predictive motion models predict the next moment's position based on the robot's motion commands. Commonly used predictive models include kinematic models and dynamic models; while feedback motion models adjust the current position according to the feedback of the robot's sensor data. Commonly used feedback models include closed-loop control and odometer models.

[0073] To identify the estimated value of the robot's position, the particle filter localization algorithm first creates a set of arbitrary particles in the state space. Then, according to the robot's sensor input, the particles are corrected by weighting. When creating the map, the particle filter algorithm can utilize the prior data provided by the map to help the robot more accurately estimate its own position and continuously enhance the position estimation result over time. Due to the synergistic effect of the motion model and the geolocation algorithm, the robot can accurately locate during the mapping process and update the map according to the sensor data, thereby creating an accurate and reliable environmental map. These maps are an important basis for the intelligent system's planning and decision-making, and in addition, they are helpful for the robot's positioning and navigation.

[0074] Using scan matching technology, first, by comparing the current lidar scan data with the existing map, the position change of the robot in the environment is detected. This process can be expressed as:

[0075] Δx=arg min Δx ∑i (d i -d i ′ ) 2

[0076] At this stage, the update of the robot pose (Δx) is based on the difference between the new scan data (d i ) and the data (d) at the corresponding position in the old map. The optimal pose transformation is determined by minimizing this difference.

[0077] Subsequently, Gmapping uses a probability model to update and fuse the observation information from different time steps. The Extended Kalman Filter (EKF-SLAM) framework is adopted to recursively estimate the posterior probability distribution of the robot pose and the environment map. In each iteration, the algorithm performs prediction and update steps to ensure the continuity and accuracy of the map and pose estimation.

[0078] x k = f(x k-1 , u k ) + W k z k = h(x k ) + v k

[0079] Here, xk is the robot state at the k-th moment, uk is the control input, wk is the process noise, zk is the observation value, and vk is the observation noise. Through continuous iteration, Gmapping can gradually improve the map details in a changing environment while maintaining an accurate estimate of the robot pose.

[0080] Resampling is an optimization method in the particle filter. As Figure 3 shown, its purpose is to reduce the number of particles and alleviate the phenomenon of particle diversity loss, thereby improving the performance of the filter. It can be expressed by the following formula.

[0081]

[0082] The Neff index is used to measure the difference between particles in the particle filter. It is related to the number of particles and the particle weights (i.e., importance weights). Specifically, a threshold is set to judge the difference between particles. When Neff is less than this set value, it means that the difference between particles is too large and resampling is required. Otherwise, resampling is not required.

[0083] To improve the accuracy of map construction, when the Gmapping algorithm is combined with an IMU, particle filtering can be used to fuse the motion information provided by the IMU and the position information provided by the lidar, thereby obtaining a more accurate robot positioning result. Particle filtering can improve the accuracy and robustness of positioning by randomly generating a set of particles in the state space and updating the weights of the particles according to sensor data. The measurement model of the IMU can be expressed as:

[0084]

[0085] where represents the acceleration and angular velocity values measured by the IMU at time t, a t 、 and represent the true value of the acceleration, the bias of the accelerometer, and the measurement noise at time t, respectively. represents the rotation matrix from the world coordinate system to the body coordinate system, g W represents the gravitational acceleration in the world coordinate system, ω t 、 and ω n represent the true value of the angular velocity, the bias of the gyroscope, and the measurement noise at time t, respectively.

[0086] In the initialization stage, Gmapping receives raw scan data from the sensor. This data is preprocessed and converted into point cloud data in the robot's coordinate system. To ensure the accuracy and consistency of the data, the coordinate transformation method is used in this conversion process. Subsequently, a combination of scan matching and Bayesian filtering forms the core of the algorithm. In the matching stage, the best match can be found by comparing the current scan with the map displayed at the previous moment. This process can be expressed as:

[0087] m * =argmin m ∑ i ρ(d i -d i (m))

[0088] where m * is the pose transformation, d i and d i (m) are the raw scan and the distance measurement value after matching, respectively, and ρ is the distance error function.

[0089] Subsequently, a Bayesian filter, such as the extended Kalman filter (EKF), is used to fuse the matching result with the robot motion model to update the robot pose estimate and the map model. The update formula of the filter is as follows:

[0090] x k|k =x k|k-1+K k (z k -H k x k|k-1 )

[0091] P k|k =(I-K k H k )P k|k-1

[0092] Here, x k|k and x k|k-1 are the posterior state estimates at the current and previous times respectively, z k is the observed data, K k is the Kalman gain, H k is the observation matrix, and P is the state covariance matrix.

[0093] Finally, in the map construction phase, Gmapping adopts a grid mapping strategy and continuously optimizes the map through probability update rules to ensure that the fusion of new information does not destroy the existing map structure. This process reflects the adaptability and robustness of the Gmapping algorithm, making it an ideal choice for indoor autonomous navigation.

[0094] In addition, it can also be fused with odometry data; the presence of straight walls and right-angled corners in the indoor environment makes the data from lidar easier to be parsed into geometric structures, which is conducive to quickly and effectively constructing a grid map. The following formula shows how Gmapping uses this geometric information for point cloud data clustering and obstacle boundary detection:

[0095]

[0096] The relative consistency of indoor lighting reduces the noise in the sensor data, enabling the Gmapping algorithm to distinguish various surfaces based on accurate reflection intensity information, thereby further improving the map details. In addition, the limited space range is conducive to the algorithm effectively processing data with limited memory and ensuring real-time map updates.

[0097] While using the Kalman filter for state estimation, the Gmapping algorithm continuously scans and matches the surrounding environment to provide accurate and real-time positioning and map updates. As shown in the following formula:

[0098] x k =F k x k-1 +B k u k +w k

[0099] In the formula, x krepresents the state estimate at the current moment, F k is the state transition matrix, B k is the control input matrix, u k is the control input, w k is the process noise.

[0100] In one embodiment, a data stream is constructed based on the detection data at the current moment and historical detection data, and the data stream is input into the Gmapping algorithm module to update the initial map, including:

[0101] Adopt a Bayesian filtering process, obtain the posterior probability distribution of the robot's position according to the sensor data, and update the map according to the result.

[0102] In one embodiment, the method for establishing an indoor environment map based on the Gmapping algorithm further includes:

[0103] In the initialization stage, feature extraction is performed on the detection data, and a sampling analysis set is constructed based on the extracted feature parameters;

[0104] Based on the sampling analysis set and a pre-configured sampling analysis library, a sampling particle data set is determined;

[0105] Based on the sampling particle data set, particle sampling is performed.

[0106] In the initialization stage, by analyzing the detection data and performing sampling under the guidance of a pre-configured sampling analysis library to obtain each particle; among them, the extracted feature parameters include: parameters representing the distances to the nearest obstacles in each emission direction of the laser sensor obtained by analyzing the detection data; the feature parameters are arranged in the order of the angles of the emission directions of the laser sensor to form a sampling analysis set;

[0107] The sampling analysis library is constructed and configured based on the analysis of a large amount of historical map construction data; in the sampling analysis library, the sampling particle data set is in one-to-one correspondence with the sampling analysis set; the construction steps of the sampling analysis library are as follows: analyze the historical map construction task, extract the particle sampling results and detection data in the initialization stage; group the detection data, that is, analyze the detection data to construct a sampling analysis set, and group according to the sampling analysis set (according to the similarity between the sampling analysis sets, the detection data with a similarity greater than a preset grouping threshold are divided into one group), analyze the resampling situation of the particle sampling results in the initialization stage in map construction, and the particle sampling result with the least resampling times and the sampling analysis set of the detection data with the largest sum of similarities to other detection data in the group can be corresponding to form a group of sampling particle data sets and sampling analysis sets; the sampling particle data set includes the position information of each sampling particle.

[0108] Since there are situations such as particle degradation in the application process of the algorithm, how to accurately implement resampling when particle degradation occurs; in one embodiment, the method for establishing an indoor environment map based on the Gmapping algorithm further includes:

[0109] In the update and improvement stage, when resampling is required, feature extraction is performed on the current detection data, and a sampling analysis set is constructed based on the extracted feature parameters;

[0110] Based on the sampling analysis set and a pre-configured sampling analysis library, a sampling particle data set is determined;

[0111] Based on the sampling particle data set and other particles that do not require resampling, resampling is performed on the particles that require resampling.

[0112] Among them, based on the sampling particle data set and other particles that do not require resampling, performing resampling on the particles that require resampling includes:

[0113] Parse the sampling particle data set to determine the total number of particles;

[0114] Based on the total number of particles and the number of other particles that do not require resampling, the sampling particle data set is grouped into particle groups;

[0115] Match the particles in each group with other particles that do not require resampling to determine the corresponding matching groups;

[0116] Based on the positional relationship between the particles not included in the grouping in the sampling particle data set and the particles included in the grouping, resampling is performed starting from the positions of other particles that do not require resampling.

[0117] In this embodiment, based on the total number of particles and the number of other particles that do not require resampling, the sampling particle data set is grouped into particle groups. Specifically, assume that the total number of particles is 60, the particles to be resampled are 1, and the particles that do not require resampling are 59. Therefore, 60 groups can be formed, with each group having 59 particles; the relative positions among the 59 particles are arranged (from largest to smallest distance) to form a first data set, and then a second data set is formed by arranging the relative positions of the particles that do not require resampling; the similarity is calculated according to the cosine similarity calculation method, and the group with the largest similarity is determined as the matching group. Then, based on the positional relationship between the particles not included in the grouping in the sampling particle data set and the particles included in the grouping, resampling is performed starting from the positions of other particles that do not require resampling. Specifically: calculate the distances between the positions of the particles included in the grouping and the positions of other particles that do not require resampling, extract the two groups with the smallest distances as the corresponding groups, and then determine the relative relationship based on the two particles included in the grouping and the particle not included in the grouping in the corresponding group. Then, using the two particles that do not require resampling in the corresponding group as the positioning, the position of the particle to be resampled is determined.

[0118] In one embodiment, to improve the accuracy of map construction, the method for establishing an indoor environment map based on the Gmapping algorithm further includes:

[0119] When updating the initial map, calculate the similarity between the currently generated map and the historically generated map;

[0120] When the similarity is less than or equal to the similarity threshold, discard the currently generated map without updating;

[0121] Among them, the similarity threshold is determined through the following steps:

[0122] Match the analysis sampling set corresponding to the currently generated map with the analysis sampling set corresponding to the previously generated map, and query the pre-configured threshold determination table according to the matching situation to determine the corresponding similarity threshold.

[0123] Since the generation of the front and back two maps is based on the migration movement of particles, there is a certain correlation between them. Therefore, the current map can be verified according to the previous map to determine whether it is abnormal, and the abnormal map is discarded to improve the accuracy of map generation.

[0124] The present invention also provides an indoor environment map establishment system based on the Gmapping algorithm, as Figure 4 shown, including: an initial module 1 and an update module 2; among them, in the initialization stage, the initial module 1 inputs the detection data into the Gmapping algorithm module to generate an initial map; in the update and improvement stage, the update module 2 constructs a data stream based on the detection data at the current moment and the historical detection data and inputs the data stream into the Gmapping algorithm module to update the initial map.

[0125] Among them, the generation steps of the initial map are as follows:

[0126] Construct a grid map and determine the initial positioning, and update the state of the grid cells in the grid map according to the initial positioning and the detection data;

[0127] Among them, the grid map is composed of a plurality of grid cells densely arranged together.

[0128] Among them, updating the state of the grid cells in the grid map according to the initial positioning and the detection data includes:

[0129] Take the pre-correspondingly configured grid cell in the middle position of the grid map as the initial positioning position;

[0130] Based on the detection data, determine the grid cells corresponding to the boundary starting from the initial positioning position, and update the state of the determined grid cells to occupied;

[0131] Update the status of grid cells between the initial positioning position and the grid cells with the status of occupied to free;

[0132] Update the status of the remaining grid cells to idle.

[0133] Among them, the update module 2 constructs a data stream based on the detection data at the current moment and the historical detection data, and inputs the data stream into the Gmapping algorithm module to update the initial map, and performs the following operations:

[0134] Adopt the Bayesian filtering process, obtain the posterior probability distribution of the robot position according to the sensor data, and update the map according to the result.

[0135] In one embodiment, the indoor environment map building system based on the Gmapping algorithm further includes: a sampling and analysis module; among them, the sampling and analysis module performs the following operations:

[0136] In the initialization stage, extract the features of the detection data, and construct a sampling and analysis set based on the extracted feature parameters;

[0137] Based on the sampling and analysis set and the pre-configured sampling and analysis library, determine the sampling particle data set;

[0138] Based on the sampling particle data set, perform particle sampling.

[0139] In one embodiment, the indoor environment map building system based on the Gmapping algorithm further includes: a re-sampling and analysis module; the re-sampling and analysis module performs the following operations:

[0140] In the update and improvement stage, when re-sampling is required, extract the features of the current detection data, and construct a sampling and analysis set based on the extracted feature parameters;

[0141] Based on the sampling and analysis set and the pre-configured sampling and analysis library, determine the sampling particle data set;

[0142] Based on the sampling particle data set and other particles that do not require re-sampling, re-sample the particles that require re-sampling.

[0143] Among them, based on the sampling particle data set and other particles that do not require re-sampling, re-sampling the particles that require re-sampling includes:

[0144] Parse the sampling particle data set to determine the total number of particles;

[0145] Based on the total number of particles and the number of other particles that do not require re-sampling, group the sampling particle data set into particles;

[0146] Match the particles in each group with other particles that do not need to be resampled to determine the corresponding matching group;

[0147] Based on the positional relationship between the particles not included in the group and the particles included in the group in the sampled particle dataset, perform resampling starting from the positions of other particles that do not need to be resampled.

[0148] In one embodiment, the indoor environment map building system based on the Gmapping algorithm further includes: a verification module; the verification module performs the following operations:

[0149] When updating the initial map, calculate the similarity between the currently generated map and the historically generated map;

[0150] When the similarity is less than or equal to the similarity threshold, discard the currently generated map without updating;

[0151] Among them, the similarity threshold is determined through the following steps:

[0152] Match the analysis sampling set corresponding to the currently generated map with the analysis sampling set corresponding to the previously generated map, and query the pre-configured threshold determination table according to the matching situation to determine the corresponding similarity threshold

[0153] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these changes and modifications.

Claims

1. A method for establishing an indoor environment map based on the Gmapping algorithm, characterized in that: include: In the initialization phase, the detection data is input into the Gmapping algorithm module to generate the initial map; In the update and improvement phase, a data stream is constructed based on the current detection data and historical detection data, and the data stream is input into the Gmapping algorithm module to update the initial map.

2. The method for establishing an indoor environment map based on the Gmapping algorithm as claimed in claim 1, characterized in that: The steps to generate the initial map are as follows: Construct a grid map and determine the initial positioning, and update the status of the grid cells in the grid map based on the initial positioning and detection data; Among them, the grid map is composed of multiple densely arranged grid units.

3. The method for establishing an indoor environment map based on the Gmapping algorithm as claimed in claim 2, characterized in that: Update the status of the grid cells in the grid map based on the initial positioning and detection data, including: The pre-configured corresponding grid unit located in the middle position of the grid map is used as the initial positioning position; Based on the detection data, starting from the initial positioning position and outwardly determining the grid cells corresponding to the boundary, updating the state of the determined grid cells to occupied; Update the status of the grid cells between the initial positioning position and the grid cells whose status is occupied to idle; Update the status of the remaining grid cells to idle.

4. The method for establishing an indoor environment map based on the Gmapping algorithm as claimed in claim 1, characterized in that: Based on the current detection data and historical detection data, a data stream is constructed and input into the Gmapping algorithm module to update the initial map, including: A Bayesian filtering process is used to derive the posterior probability distribution of the robot's position based on the sensor data, and the map is updated based on the results.

5. The method for establishing an indoor environment map based on the Gmapping algorithm as claimed in claim 1, characterized in that: Also includes: In the initialization stage, feature extraction is performed on the detection data, and a sampling analysis set is constructed based on the extracted feature parameters; Determine a sampling particle data set based on a sampling analysis set and a pre-configured sampling analysis library; Particle sampling is performed based on the sampled particle data set.

6. The method for establishing an indoor environment map based on the Gmapping algorithm as claimed in claim 1, characterized in that: Also includes: In the updating and improvement phase, when resampling is required, feature extraction is performed on the current detection data, and a sampling analysis set is constructed based on the extracted feature parameters; Determine a sampling particle data set based on a sampling analysis set and a pre-configured sampling analysis library; Resample the particles that need to be resampled based on the sampled particle data set and other particles that do not need to be resampled.

7. The method for establishing an indoor environment map based on the Gmapping algorithm as claimed in claim 6, characterized in that: Based on the sampled particle data set and other particles that do not need to be resampled, resample the particles that need to be resampled, including: Parse the sampled particle data set to determine the total number of particles; The sampled particle data set is grouped into particles based on the total number of particles and the number of other particles that do not need to be resampled; Match the particles in each group with other particles that do not need to be resampled to determine the corresponding matching groups; According to the positional relationship between the particles not included in the group and the particles included in the group in the sampled particle data set, resampling is performed starting from the positions of other particles that do not need to be resampled.

8. The method for establishing an indoor environment map based on the Gmapping algorithm as claimed in claim 1, characterized in that: Also includes: When updating the initial map, the similarity between the currently generated map and the historically generated map is calculated; When the similarity is less than or equal to the similarity threshold, the currently generated map is discarded and not updated; The similarity threshold is determined by the following steps: The analysis sampling set corresponding to the currently generated map is matched with the analysis sampling set corresponding to the last generated map, and a pre-configured threshold determination table is queried according to the matching situation to determine the corresponding similarity threshold.

9. A system for establishing indoor environment maps based on the Gmapping algorithm, characterized in that: include: Initial module and update module; in the initialization phase, the initial module inputs the detection data into the Gmapping algorithm module to generate an initial map; During the update and improvement phase, the update module builds a data stream based on the current detection data and historical detection data and inputs the data stream into the Gmapping algorithm module to update the initial map.

10. The indoor environment map building system based on the Gmapping algorithm as claimed in claim 9, characterized in that: The steps to generate the initial map are as follows: Construct a grid map and determine the initial positioning, and update the status of the grid cells in the grid map based on the initial positioning and detection data; Among them, the grid map is composed of multiple densely arranged grid units.