Map construction method applied to dangerous gas leakage scenarios
By introducing adaptive ant colony algorithm and resampling technology into the Gmapping algorithm, the problem of insufficient map accuracy in robots in dangerous gas leakage scenarios is solved, and more efficient navigation and more stable autonomous navigation are achieved.
Patent Information
- Application Number
- CN202310258798.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2043-03-17
AI Technical Summary
In dangerous gas leakage scenarios, existing robot SLAM algorithms are prone to particle scarcity and loss of diversity in environments with highly similar and closed loops, resulting in insufficient map accuracy and navigation errors.
Adaptive ant colony algorithm is used to optimize the Gmapping algorithm, avoid particle loss through resampling technology, and adjust the ant colony optimization algorithm in real time in complex environments to improve particle diversity and search efficiency.
It improves the efficiency of robot navigation in warehouse environment and the accuracy of map construction, reduces navigation errors, and achieves more stable autonomous navigation in dangerous gas environments.
Smart Images

Figure CN116358521B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot SLAM algorithm mapping and autonomous navigation, and particularly relates to a method for constructing a robot map applied to a hazardous gas environment. Background Art
[0002] The production environment conditions in chemical plants are complex. Leakage of hazardous gases can easily cause disasters such as fires, explosions, and toxic gas hazards, seriously endangering the personal and property safety of the masses. The complex accident site conditions greatly increase the difficulties, costs, and risks of rescue. Currently, the general response method is to quickly evacuate the residents in the polluted environment of the leakage to the upwind area, and promptly implement isolation and strictly control access. Organize personnel to wear protective clothing and enter the accident site from the upwind direction, and take measures to cut off the leakage source as much as possible. The manual emergency method relies on the senses and experience of emergency personnel. The gas leakage makes the factory environment more complex, the visibility decreases, and the accuracy is not high. Moreover, toxic and harmful gases are likely to threaten the health and even life safety of emergency personnel.
[0003] In the face of gas leakage, with the complex and changeable on-site conditions, affected environmental information, and the inability to perform remote control over a long distance, there is an urgent need for a method that can actively collect map environmental information of unfamiliar places and implement emergency disposal for gas leakage sites. The intelligent robot and emergency control system in chemical plants can, through their flexible operation and convenient management characteristics, independently implement an emergency leakage control method for the leakage of hazardous substances in chemical plants. By collecting information on the situation of hazardous substances and site conditions, the control mechanism can take corresponding measures according to the returned data, facilitating subsequent personnel to enter the site for processing. The robot autonomous first aid system introduced in chemical plants can greatly improve the speed of first aid. At the same time, technicians no longer have to spend a lot of time simulating and guessing the gas leakage site, thus greatly improving the rescue effect and service quality. More importantly, it reduces the potential life and health risks of chemical plant personnel when they enter the site for emergency disposal. The robot can also play a unique and key role in chemical plants, thus providing a more powerful guarantee for the safe production of chemical enterprises. Therefore, the map construction robot system applied to the hazardous gas leakage scenario has great practical significance.
[0004] Based on the above, it is crucial to construct an accurate and complete map. In an environment with high similarity and many closed-loop circuits, the Gmapping algorithm will experience particle depletion and loss of particle diversity. During the process of robot navigation in a warehouse, most will face an environment with high similarity and many closed-loop circuits, which leads to insufficient accuracy of the constructed map, resulting in errors and mistakes in the entire navigation process and low efficiency. Summary of the Invention
[0005] Objective of the Invention: Aiming at the problems such as insufficient accuracy of the constructed map pointed out in the background art, the present invention proposes a method for constructing a robot map applied to the scenario of dangerous gas leakage, so as to improve the navigation efficiency of the robot in the warehouse environment.
[0006] Technical Solution: The present invention provides a method for constructing a robot map applied to a dangerous gas environment. This method is based on an electric robot, and two DC motors drive the robot to move. A lidar is installed on the robot, and the method includes the following steps:
[0007] Step 1: The depth information of the external environment is sensed through the lidar. The laser emitter is responsible for emitting laser, the receiver is responsible for receiving the light reflected from the obstacle, and the distance to the target object is calculated. The DC motor is responsible for the rotation of the lidar, thereby establishing a two-dimensional map. After rotating one circle, a point cloud image is obtained; based on the encoder to sense the rotational speed information of the DC motor, the speed information and pose information are obtained from the rotational speed information, and finally the odometer data information is obtained.
[0008] Step 2: Based on the collected odometer data and lidar data, the adaptive ant colony algorithm is used to optimize the Gmapping algorithm to realize the construction of the two-dimensional grid map of the robot and the simultaneous localization.
[0009] Step 3: Based on the cooperation of global path planning and local path planning, a path planning for the autonomous navigation of the robot is formed. The A* algorithm is used to realize the global path planning, and the DWA algorithm is used to realize the local path planning and dynamic obstacle avoidance.
[0010] Furthermore, the specific method for using the Gmapping algorithm in Step 2 to realize the construction of the two-dimensional grid map of the robot and the simultaneous localization is as follows:
[0011] According to the conditional Bayesian rule, we have:
[0012] p(x 1:t ,m|z 1:t ,u 1:t-1 )=p(m|x 1:t ,z 1:t )·p(x 1:t |z 1:t ,u 1:t-1 )
[0013] Wherein, p(x 1:t ,m|z 1:t ,u 1:t-1 ) is the joint posterior probability of estimating the environmental map and the robot trajectory from the lidar information and the odometer information; p(x 1:t |z 1:t ,u 1:t-1) For the positioning probability problem, the odometry data and lidar observations are used to estimate the pose of the robot; p(m|x 1:t ,z 1:t ) is the map probability estimation problem. Given the current robot pose, the incremental m map can be updated;
[0014] 1) When calculating the proposal distribution, the lidar sensor observations are taken into account, and the sampling process is concentrated in the more meaningful peak region of the likelihood function L (i) is carried out. The Gaussian distribution is used to approximate the peak region of the observation likelihood, so as to obtain an optimized proposal distribution. The Gaussian distribution parameters and are determined by K sub-sampling points in the interval L (i) :
[0015]
[0016] where the normalization factor η (i) is:
[0017]
[0018] For each particle, a weight is assigned to it for use in the subsequent resampling step using its particle weight. The calculation method of the weight is as follows:
[0019]
[0020] 2) The effective sampling scale criterion is used to measure the quality of the particle set and determine when to perform the resampling process. The formula is as follows:
[0021]
[0022] where, is the weight of the i-th particle. The worse the particle set estimates the proposal distribution, the smaller N eff is.
[0023] Further, when using the Gmapping algorithm to implement the construction of the robot's 2D grid map and simultaneous localization, the ant colony algorithm is used to improve the resampling process of the Gmapping algorithm. The specific operations are as follows:
[0024] Through the known prior probability density distribution p(x 0 ) of the random dynamic system, N samplings are performed to obtain the initial particles at time t = 0 The initial weight value corresponding to each particle is
[0025] For i = 1,..., N, according to sample new particles
[0026] According to the current observed value y t , calculate each particle 's weight:
[0027]
[0028] Eliminate the particles whose estimated values and true values have different signs:
[0029] When , then set the weight Conversely, the weight remains unchanged;
[0030] Then normalize the particle weights:
[0031] The set of transition probabilities for the i-th particle at the t-th moment to transfer to the j-th particle Compare to obtain the maximum transition probability And set the transition probability threshold to λ; when , let When , let Update the particle set The weight set corresponding to each particle is Output the state estimate value At the same time, make t = t + 1.
[0032] Furthermore, in the resampling process of improving the Gmapping algorithm using the ant colony algorithm, the ant colony algorithm is also improved, and an adaptive ant colony algorithm is proposed: using a pseudo-random state transition rule, the new state transition formula is as follows:
[0033]
[0034] Where: q is a random number with a value within [0, 1]; q 0 is the ratio of the shortest path lengths in the previous two iterations. When q ≤ q 0 , the ant will select the node with the maximum product of the heuristic function value and the pheromone concentration from the adjacent nodes of its current node i as the next node to move to; when q > q 0 , the ant will first calculate the product of the heuristic function value and the pheromone concentration of each node in the next optional node set, and then use the roulette wheel method to determine the next node.
[0035] Furthermore, the specific steps of optimizing the Gmapping algorithm using the adaptive ant colony algorithm are as follows
[0036] 1) Preprocess the data information received by the odometer and the lidar data information, and initialize the required parameters;
[0037] 2) Convert the lidar data into particles. Multiple particles form point cloud information. Perform linear fitting on the point cloud information to determine whether the point cloud fluctuation is greater than the set threshold value.
[0038] 3) Determine whether the point cloud fluctuation is greater than the set threshold value. If it is determined that the point cloud fluctuation is greater than the set threshold value, proceed to the next step; otherwise, if it is determined that the point cloud fluctuation is less than the set threshold value, reduce the number of particles and go to step 5).
[0039] 4) Perform adaptive optimization. Adopt the pseudo-random state transition rule to increase particle diversity and improve the global search ability of the ant colony.
[0040] 5) Perform scan matching. Sample from the optimized proposal distribution and calculate the weight of the current particle.
[0041] 6) Output the global extreme point and the optimal individual value, and recalculate the particle weight and perform normalization processing.
[0042] 7) Perform selective resampling according to the number of effective particles, that is, set a threshold value. When the number of effective particles is less than the threshold value, resampling is performed; otherwise, this operation is not performed.
[0043] 8) Divide the current particles into a high-weight area and a low-weight area according to the weights of the particles.
[0044] 9) Determine whether the number n of particles in the high-weight area is greater than the set threshold value. If it is less than the threshold value, perform the next optimization operation; otherwise, directly jump to step 11).
[0045] 10) Calculate the global optimal value, perform ant colony optimization processing, and at the same time calculate the attraction between each particle and the optimal particle, and then perform optimization. Migrate the particles with smaller weights in the optimal prediction area of the particles. If the iteration number or accuracy is reached, stop the optimization; otherwise, continue to execute step 10).
[0046] 11) Update the map.
[0047] Beneficial effects:
[0048] 1. The Gmapping algorithm of the present invention avoids particle loss through resampling technology. The method is to repeat the particles with larger original weights after eliminating the particles with smaller original connection weights. The advantage of this technology is that the operation is simple, but when performing repeated iterations, it will cause the particles to lose diversity. By using the ant colony optimization method, the particles with smaller weights are migrated in the optimal prediction area of the particles, but not all the particles with the same weights are copied, and the position of the particle with the largest weight remains unchanged, which will make the particles well and evenly distributed, thus ensuring the stable diversity of the particles.
[0049] 2. The present invention proposes an adaptive ant colony algorithm. First, set the adaptive conditions, linearly fit the number of sampled particles and the complexity of the real environment. When the fluctuation of the two-dimensional laser point cloud is greater than a certain threshold, use the adaptive ant colony algorithm to optimize the algorithm. Otherwise, appropriately reduce the number of samples to optimize the sampling processing time of the algorithm. The difference between the adaptive ant colony algorithm and the ordinary ant colony algorithm is that the ordinary ant colony algorithm uses traditional state transition rules and roulette wheel selection methods to prompt ants to select better values in the current solution. However, when the point cloud fluctuation exceeds the threshold, it is considered that the external environment is a complex environment, and the sampled particles may not be evenly distributed in the entire solution space, resulting in insufficient particle diversity. If the ordinary ant colony optimization Gmapping algorithm is used at this time, particles with smaller weights are migrated in the optimal prediction area of the particles. As the iteration progresses, the population is likely to fall into a local optimal solution, resulting in the phenomenon of algorithm stagnation. The adaptive ant colony algorithm uses a pseudo-random state transition rule to improve the search efficiency and quality of the algorithm.
[0050] 3. The global route planning of the present invention requires understanding all natural environment information and completing route planning through various information in the environmental map; the local route planning only requires real-time collection of surrounding environment signals by sensors, understanding the surrounding environment map information, and then judging the orientation of the map and the distribution of local obstacles, so as to be able to select the best route from the current node to a certain sub-goal node. By using the method of integrating global route planning and local route planning, the map construction robot can quickly find the best global map path under the condition of dangerous gas leakage environment by using global route planning, and at the same time, through local path planning, the map construction robot can perform dynamic obstacle avoidance. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flowchart of the map construction robot system applied to the dangerous gas leakage scenario provided by the embodiment of the present invention;
[0052] Figure 2 It is a flowchart of the adaptive ant colony optimization gmapping algorithm;
[0053] Figure 3 It is a simulation diagram of the path planning of the disinfection robot based on the traditional algorithm provided by the embodiment of the present invention;
[0054] Figure 4 It is a simulation diagram of the path planning of the disinfection robot based on the improved algorithm provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0055] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made. These all belong to the protection scope of the present invention.
[0056] See Figure 1 , which is a method for constructing a robot map applied to a hazardous gas leakage scenario provided by an embodiment of the present invention. This method is based on an electric robot and is driven by two DC motors to drive the robot to move. A lidar is provided on the robot. The map construction method includes the following steps:
[0057] S1: Start the hardware devices of the robot. The robot hardware device system is mainly divided into four parts: a sensing system, a control system, a driving system, and an actuator. It includes:
[0058] Actuator: The main body is assembled with acrylic plates, and two DC motors are used to drive the front wheels and two passive rear wheels to realize the movement of the robot.
[0059] Driving system: Battery, arduino, and motor driver module.
[0060] Control system: Raspberry Pi.
[0061] Sensing system: Encoder, single-line lidar, camera.
[0062] S2: Sense the depth information of the external environment through the lidar. The laser emitter is responsible for emitting laser, the receiver is responsible for receiving the light reflected from the obstacle, calculates the distance to the target object, and the DC motor is responsible for the rotation of the lidar, thereby establishing a two-dimensional map. After rotating one circle, a point cloud image is obtained; based on the encoder to sense the rotational speed information of the DC motor, the speed information and pose information are obtained from the rotational speed information, and finally the odometer data information is obtained.
[0063] S3: Based on the collected odometer data and lidar data, through the Gmapping algorithm, draw a two-dimensional grid map of the surrounding environment to realize the map construction function.
[0064] The Gmapping algorithm is obtained by improving and optimizing the RBPF SLAM algorithm as the basic algorithm. According to the surrounding environment data information collected by the lidar and the odometer, it improves the optimization proposal distribution and limits the number of resampling times, reduces the number of particles required for the SLAM algorithm to construct the map environment, and enhances the operation efficiency function. According to the conditional Bayesian rule, there is
[0065] p(x 1:t ,m|z 1:t, u 1:t-1 ) = p(m|x 1:t , z 1:t )·p(x 1:t |z 1:t , u 1:t-1 )
[0066] where p(x 1:t , m|z 1:t , u 1:t-1 ) is the joint posterior probability of estimating the environmental map and the robot trajectory using lidar information and odometry information. p(x 1:t |z 1:t , u 1:t-1 ) is the positioning probability problem, and the pose of the robot is estimated using odometry data and lidar observations. p(m|x 1:t , z 1:t ) is the map probability estimation problem, and the incremental m map can be updated relatively easily from the current robot pose.
[0067] There are mainly two problems in RBPF SLAM. One is that map building has high requirements for the robot pose. For any particle, constructing a map only relying on the results of sampling by the motion model will result in very large errors. The other is the problem of particle dissipation caused by frequent resampling. Gmapping gives optimized proposal distribution methods and controls the number of resampling times for these two problems respectively.
[0068] For the optimization of the proposed distribution, sensor observations are taken into account when calculating the proposed distribution, and the sampling process is concentrated in the more meaningful peak region L of the likelihood function (i) to perform. The peak region of the observation likelihood is approximated using a Gaussian distribution to obtain an optimized proposed distribution, and the Gaussian distribution parameters and are determined by K sub-sampling points within the interval L (i) :
[0069]
[0070] where the normalization factor η (i) is:
[0071]
[0072] In addition, for each particle, a weight needs to be given to it so that its particle weight can be used in the subsequent resampling step. The calculation method of the weight is as follows:
[0073]
[0074] Controlling the number of resamplings is also a crucial step. Since only a finite number of particles are used as an approximation of the target distribution, resampling can replace low-weight particles with high-weight particles. However, the resampling process may eliminate excellent particles from the filter, resulting in a poor particle count. Thus, the effective sampling scale criterion can be used to evaluate the quality of the particle set and determine when to perform the resampling process. The formula is as follows:
[0075]
[0076] where, is the weight of the i-th particle. The worse the particle set estimates the proposal distribution, the smaller N eff becomes.
[0077] S4: When running the Gmapping algorithm, since the number of sampling particles in the algorithm remains fixed, while the real environment is complex and variable, constructing a complex and variable environment map with a fixed number of particles will not only waste computing resources but also make it difficult to ensure the integrity of mapping in a complex environment. The present invention introduces an adaptive ant colony algorithm to optimize the resampling process of the Gmapping algorithm, moving particles with low weights towards particles with higher weights to prevent low-weight particles from disappearing after repeated iterations, and adjusting the ant colony optimization algorithm in real time according to the real environment.
[0078] The Gmapping algorithm avoids particle loss through resampling technology. After eliminating particles with smaller original connection weights, it duplicates particles with larger original weights. The advantage of this technology is its simplicity in operation. However, during repeated iterations, it will lead to a lack of particle diversity. If the ant colony optimization method is used, moving particles with smaller weights in the optimal prediction region of the particles, but not completely replicating particles with weights, and keeping the position of the particle with the largest weight unchanged, will result in a good uniform distribution of particles, thus ensuring stable particle diversity.
[0079] The ant colony algorithm is a swarm intelligence algorithm designed based on the principle of ant foraging. At the initial moment, the pheromone on each path is equal. Let the pheromone trail intensity τ ij (0) = c (c is a constant). Ant k (k = 1, 2,..., m) determines the transfer direction based on the pheromone on each path during movement. Suppose ant k moves from node i to the next node j, then the state transition formula is:
[0080]
[0081] where: C is the set of the next selectable nodes; τ ij (t) is the pheromone concentration; η ij(t) is the heuristic information function value; the value of α represents the degree of attraction of pheromone concentration to ants. The larger the value, the greater the probability that ants move to the path with higher pheromone concentration; β is the important factor of heuristic information. The larger the value of β, the more inclined ants are to move to the path with better evaluation by the heuristic function. That is, β is the influence of the heuristic function value on path selection; η ij (t) is the expected degree from the current node to the next node.
[0082] After n time instants, the ants complete one cycle, and the pheromone amount on each path is adjusted according to the following formula:
[0083] τ ij (t + 1) = ρ·τ ij (t) + Δτ ij (t, t + 1)
[0084]
[0085] where Δτ ij (t, t + 1) represents the pheromone left by the k-th ant on the path (i, j) at time (t, t + 1), and its value depends on the performance of the ant. The shorter the path, the more pheromone is released; Δτ ij (t, t + 1) represents the increase in the pheromone amount on the path (i, j) in this cycle; (1 - ρ) is the attenuation coefficient of the pheromone trail. Usually, the coefficient ρ < 1 is set to avoid the infinite superposition of the trail amount on the path.
[0086] Improve the Gmapping algorithm based on ant colony optimization. The steps are as follows:
[0087] Through the known prior probability density distribution p(x 0 ) of the random dynamic system, perform N samplings to obtain the initial particles at t = 0 The initial weight value corresponding to each particle is
[0088] For i = 1, …, N, according to Sample new particles
[0089] According to the current observed value y t , calculate the weight value of each particle :
[0090]
[0091] In order to cooperate with the ant colony algorithm to obtain better tracking effects, it is necessary to eliminate the particles with false weight values, that is, eliminate the particles whose estimated values and true values have different signs.
[0092] When is satisfied, then set the weight value Conversely, the weights remain unchanged.
[0093] Renormalize the particle weights:
[0094]
[0095] The set of transition probabilities that the i-th particle transfers to the j-th particle at the t-th moment Compare to obtain the maximum value of the transition probability And set the transition probability threshold to λ. When , let When , let Update the particle set The weight set corresponding to each particle is
[0096]
[0097] Output the state estimation value At the same time, let t = t + 1.
[0098] Due to the complex situation of the real environment, the number of sampling particles in the algorithm is fixed. Therefore, constructing a complex and changeable environmental map with a fixed number of particles results in a high randomness of sampling particles, and the sampling particles are not necessarily evenly distributed throughout the solution space, leading to a slow ant colony search speed, being easily trapped in local optimal solutions, and the phenomenon of algorithm stagnation. The lack of algorithm diversity will cause waste of computing resources and it is also difficult to ensure the mapping integrity of complex environments.
[0099] The present invention proposes an adaptive ant colony algorithm. First, set the adaptive conditions, linearly fit the number of sampling particles and the complexity of the real environment. When the fluctuation amount of the two-dimensional laser point cloud is greater than a certain threshold, use the adaptive ant colony algorithm for algorithm optimization. Conversely, appropriately reduce the number of samplings to optimize the sampling processing time of the algorithm. The algorithm running steps are as follows: when the system starts, the odometer and lidar collect the surrounding environment information. First, perform linear fitting processing on the laser point cloud, and then judge the fluctuation amount of the point cloud linearity; when the fluctuation amount is less than the set threshold, it is determined that the external environment is a simple environment. At this time, reduce the number of sampling particles to achieve the purpose of reducing the system operation amount; when the point cloud fluctuation amount exceeds the threshold, it is determined that the external environment is a complex environment. The sampling particles are not necessarily evenly distributed throughout the solution space, resulting in a slow population search speed and insufficient algorithm diversity. Use the adaptive ant colony algorithm for algorithm optimization to enhance the positioning and mapping effect of the system for complex environments; then perform operations such as point cloud matching, weight calculation, resampling, and map update.
[0100] The difference between the adaptive ant colony algorithm and the ordinary ant colony algorithm is that the ordinary ant colony algorithm uses traditional state transition rules and roulette selection methods to prompt ants to select better values in the current solution. However, when the point cloud fluctuation exceeds the threshold, the external environment is considered a complex environment, and the sampling particles may not be evenly distributed throughout the solution space, resulting in insufficient particle diversity. If the ordinary ant colony optimization gmapping algorithm is used at this time, particles with smaller weights are migrated in the optimal prediction area of the particles. As the iteration progresses, the population is likely to fall into a local optimal solution, resulting in the phenomenon of algorithm stagnation. To improve the search efficiency and quality of the algorithm, a pseudo-random state transition rule is now adopted. The new state transition formula is as follows:
[0101]
[0102] where: q is a random number with a value within [0, 1]; q 0 is the ratio of the shortest path lengths in the previous two iterations. When q ≤ q 0 , the ant will select the node with the maximum product of the heuristic function value and the pheromone concentration from the adjacent nodes of its current node i as the next node to move to. When q > q 0 , the ant first calculates the product of the heuristic function value and the pheromone concentration of each node in the next optional node set, and then uses the roulette method to determine the next node. It can be seen that whether the ant selects the next node in a deterministic mode or a probabilistic mode depends on the value of q 0 . When q 0 is larger, the ant has a greater probability of selecting the next node in a deterministic manner, which can accelerate the convergence speed but is prone to falling into a local optimum and reducing the global search ability of the ant colony. On the contrary, when q 0 is smaller, the ant has a greater probability of selecting the next node in a probabilistic mode, that is, the roulette mode. Therefore, the ant colony has a stronger ability to jump out of the local optimum, and the global search ability of the algorithm is higher.
[0103] S5: The specific steps of adaptive ant colony optimization gmapping are as follows:
[0104] 1. Preprocess the data information received by the odometer and the lidar data information, and initialize the required parameters.
[0105] 2. Convert the lidar data into particles, and multiple particles form point cloud information. Perform a linear fit on the point cloud information to determine whether the point cloud fluctuation is greater than the set threshold.
[0106] 3. Determine whether the point cloud fluctuation is greater than the set threshold. If it is determined that the point cloud fluctuation is greater than the set threshold, proceed to the next step; otherwise, if it is determined that the point cloud fluctuation is less than the set threshold, reduce the number of particles and go to step 5.
[0107] 4. Perform adaptive optimization, adopt the above pseudo-random state transition rule, increase particle diversity, and improve the global search ability of the ant colony.
[0108] 5. Scan and match, sample from the optimized proposal distribution, and calculate the weight of the current particle.
[0109] 6. Output the global extreme point and the optimal individual value, and recalculate the particle weight and perform normalization processing.
[0110] 7. Perform selective resampling according to the number of effective particles, that is, set a threshold; when the number of effective particles is less than the threshold, resampling is performed; otherwise, this operation is not performed.
[0111] 8. Divide the current particles into a high-weight area and a low-weight area according to the particle weights.
[0112] 9. Judge whether the number of particles n in the high-weight area is greater than the set threshold. If it is less than the threshold, perform the next optimization operation; otherwise, directly jump to step 11.
[0113] 10. Calculate the global optimal value, perform ant colony optimization, and at the same time calculate the attraction between each particle and the optimal particle, and then perform optimization. Migrate the particles with smaller weights in the optimal prediction area of the particles; if the iteration times or accuracy are reached, stop the optimization, otherwise continue to execute step 10.
[0114] 11. Update the map.
[0115] S6: According to the map information drawn, the global path planning adopts the A* algorithm, and the local path planning adopts the DWA algorithm. By combining the global path planning and the local path planning, dynamic obstacle avoidance is realized under the condition of the global optimal route.
[0116] Specifically, the A* algorithm is the most effective direct search method for solving the shortest path in a static road network, and it is also an effective algorithm for solving many search problems. The closer the distance estimation value in the algorithm is to the actual value, the faster the final search speed. The core of the A* algorithm lies in the evaluation function:
[0117] f(n) = g(n) + h(n)
[0118] where g(n) is the dissipation function, which represents the actual cost from the starting node n start to node n; where h(n) is the heuristic function, which represents the estimated cost from node n to the target node n goal ; where f(n) represents the estimated cost from the starting node via node n to the target node.
[0119] The DWA algorithm is an obstacle avoidance planning method. By imposing constraints on the velocity space, the DWA algorithm ensures the requirements of the dynamic model and obstacle avoidance, searches for the optimal control velocity of the robot in the velocity space, and finally achieves reaching the destination quickly and safely. The implementation of the DWA algorithm mainly consists of two parts: 1. Reducing the velocity space. 2. Defining the objective function and maximizing the objective function. This technology is a well-known obstacle avoidance planning method for those skilled in the art and is not the focus of protection of the present invention, so it will not be elaborated here.
[0120] Global path planning requires understanding all natural environment information and completing path planning through various information in the environmental map; local path planning only requires real-time collection of surrounding environment signals by sensors, understanding the surrounding environment map information, and then judging the orientation in the map and the distribution of local obstacles, so that the best path from the current node to a certain sub-goal node can be selected. By using the method of integrating global path planning and local path planning, the map construction robot can quickly find the best global map path under the condition of dangerous gas leakage environment by using global path planning, and at the same time, through local path planning, the map construction robot can perform dynamic obstacle avoidance.
[0121] Specifically, as Figure 3 shown, based on the Ubuntu system, through the rviz and gazebo programs, a simulation car experiment is carried out to simulate the effect diagram of laser SLAM of the simulation car in the real environment by using the adaptive ant colony optimization Gmapping algorithm.
[0122] As Figure 4 shown, based on the Ubuntu system, through the rviz and gazebo programs, a simulation car experiment is carried out to simulate the effect diagram of laser SLAM of the simulation car in the real environment by using the traditional Gmapping algorithm. By comparing the two figures, it can be seen that the adaptive ant colony gmapping algorithm is clearer and better than the traditional Gmapping algorithm in terms of the drawing effect.
[0123] The above embodiments are only for explaining the technical concept and characteristics of the present invention, and their purpose is to enable those who are familiar with this technology to understand the content of the present invention and implement it accordingly, and cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit and essence of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for constructing a robot map applied to a hazardous gas environment, characterized in that, this method is based on an electric robot, and two DC motors drive the robot to move. A lidar is installed on the robot, and the method includes the following steps: Step 1: Sense the depth information of the external environment through the lidar. The laser emitter is responsible for emitting laser light, the receiver is responsible for receiving the light reflected from obstacles, calculate the distance to the target object, and the DC motor is responsible for the rotation of the lidar, thereby establishing a two-dimensional map. After rotating one circle, a point cloud image is obtained; based on the encoder, sense the rotational speed information of the DC motor, and obtain the speed information and pose information from the rotational speed information, and finally obtain the odometer data information; Step 2: Based on the collected odometer data and lidar data, introduce the ant colony algorithm to optimize the resampling process of the Gmapping algorithm, and realize the construction of the robot's two-dimensional grid map and instant positioning; Step 3: Based on the cooperation between global path planning and local path planning, form a path planning for the robot's autonomous navigation. The A* algorithm is used to implement global path planning, and the DWA algorithm is used to implement local path planning and dynamic obstacle avoidance.
2. The method for constructing a robot map applied to a hazardous gas environment according to claim 1, characterized in that, the specific method for using the Gmapping algorithm in step 2 to construct the robot's two-dimensional grid map and instant positioning is as follows: According to the conditional Bayesian rule, there is: p(x 1:t ,m|z 1:t ,u 1:t-1 ) = p(m|x 1:t ,z 1:t )·p(x 1:t |z 1:t ,u 1:t-1 ) where p(x 1:t , m|z 1:t , u 1:t-1 ) is the joint posterior probability of estimating the environmental map and the robot trajectory from lidar information and odometry information; p(x 1:t |z 1:t , u 1:t-1 ) is the positioning probability problem, which estimates the pose of the robot using odometry data and lidar observations; p(m|x 1:t , z 1:t ) is the map probability estimation problem, and the incremental m map can be updated from the current robot pose; 1) Consider lidar sensor observations when calculating the proposal distribution, and concentrate the sampling process in the peak region L of the more meaningful likelihood function (i) Perform, approximate the peak region of the observation likelihood using a Gaussian distribution, so as to obtain an optimized proposal distribution, and the Gaussian distribution parameters and are determined by K subsampling points within the interval L (i) : Among them, the normalization factor η (i) is as follows: For each particle, give it a weight for use in the subsequent resampling step using its particle weight. The calculation method of the weight is as follows: 2) Use the effective sampling scale criterion to measure the quality of the particle set and determine when to implement the resampling process. The formula is as follows: Among them, is the weight of the i-th particle. The worse the particle set estimates the proposed distribution, the smaller N eff is.
3. The method for constructing a robot map applied to a hazardous gas environment according to claim 2, characterized in that, when using the Gmapping algorithm to construct the robot's two-dimensional grid map and instant positioning, use the ant colony algorithm to improve the resampling process of the Gmapping algorithm. The specific operation is as follows: Through the prior probability density distribution p(x 0 ) of the known random dynamic system, N samplings are performed to obtain the initial particles at time t = 0 The initial weight value corresponding to each particle is For i = 1, …, N, according to Sample new particles Based on the current observed value y t , calculate the weight of each particle : Eliminate the particles whose estimated values have different signs from the true values: When then set the weight Otherwise, the weight remains unchanged; Renormalize the particle weights: The set of transition probabilities that the $i$-th particle transfers to the $j$-th particle at the $t$-th moment Compare to obtain the maximum value of the transition probability And set the transition probability threshold to $\lambda$; when , let When , let Update the particle set The weight set corresponding to each particle is Output the state estimate value At the same time, let $t = t + 1$.
4. The method for constructing a robot map applied to a hazardous gas environment according to claim 3, characterized in that, when using the ant colony algorithm to improve the resampling process of the Gmapping algorithm, the ant colony algorithm is also improved, and an adaptive ant colony algorithm is proposed: adopt a pseudo-random state transition rule, and the new state transition formula is as follows: where: q is a random number with a value within [0, 1]; q 0 is the ratio of the shortest path lengths in the previous two iterations. When q ≤ q 0 , the ant will select, from the adjacent nodes of its current node i, the node with the maximum product of the heuristic function value and the pheromone concentration as the next node to move to. When q > q 0 , the ant will first calculate the product of the heuristic function value and the pheromone concentration for each node in the set of next selectable nodes, and then use the roulette wheel method to determine the next node.
5. The method for constructing a robot map applied to a hazardous gas environment according to claim 4, characterized in that, the specific steps for using the adaptive ant colony algorithm to optimize the Gmapping algorithm are as follows 1) Preprocess the data information received by the odometer and the lidar data information, and initialize the required parameters; 2) Convert the lidar data into particles, multiple particles form point cloud information, perform linear fitting on the point cloud information, and judge whether the point cloud fluctuation amount is greater than the set threshold; 3) Determine whether the point cloud fluctuation quantity is greater than the set threshold value. If it is determined that the point cloud fluctuation quantity is greater than the set threshold value, proceed to the next step; otherwise, if it is determined that the point cloud fluctuation quantity is less than the set threshold value, reduce the number of particles and go to step 5); 4) Perform adaptive optimization, adopt the pseudo-random state transition rule, increase particle diversity, and improve the global search ability of the ant colony; 5) Perform scan matching, sample from the optimized proposal distribution, and calculate the weight of the current particle; 6) Output the global extreme point and the optimal individual value, and recalculate the particle weights and perform normalization processing; 7) Perform selective resampling according to the number of effective particles, that is, set a threshold value; when the number of effective particles is less than the threshold value, perform resampling; otherwise, do not perform this operation; 8) Divide the current particles into a high-weight area and a low-weight area according to the weights of the particles; 9) Determine whether the number of particles n in the high-weight area is greater than the set threshold value. If it is less than the threshold value, perform the next optimization operation; otherwise, directly jump to step 11); 10) Calculate the global optimal value, perform ant colony optimization processing, and at the same time calculate the attraction degree between each particle and the optimal particle, and then perform optimization. Migrate the particles with smaller weights in the optimal prediction area of the particles; if the iteration number or accuracy is reached, stop the optimization, otherwise continue to execute step 10); 11) Update the map.
Citation Information
Patent Citations
Mobile robot autonomous navigation method based on fusion algorithm
CN113759904A
Autonomous navigation method and system for intelligent indoor logistic transportation based on one-shot imitation
US20220390951A1