Robot self-positioning method and device based on self-adaptive extension reset and medium
Through the adaptive expansion reset robot autonomous positioning method, combined with single-line lidar and odometer data, dynamically adjust the particle expansion range, solving the problems of high complexity of robot positioning and low adaptive recovery, and improving positioning robustness and real-timeness.
Patent Information
- Application Number
- CN202510588207.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-05-08
AI Technical Summary
The existing robot positioning methods have high computational complexity and low real-time performance of adaptive recovery, especially in indoor dynamic obstacle environments, which are prone to position loss and motion planning failure.
Adaptive extended reset is adopted to initialize the particle set through single-line lidar, odometer and two-dimensional raster map data, calculate the likelihood value and global matching indicators, dynamically adjust the particle expansion range, use adaptive factors to perform expansion reset, update the particle weight, and improve positioning robustness.
It effectively solves the problems of particle degradation and low real-time performance during robot positioning, improves the robustness and efficiency of robot positioning, reduces the computational complexity, and achieves rapid recovery of positioning.
Smart Images

Figure CN120252733A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence, and relates to a robot autonomous positioning method, device and medium based on adaptive extended reset. Background Technique
[0002] With the intelligent development and industrial application of robots, real-time positioning of robots plays a key role. Whether it is an outdoor inspection robot or an indoor service robot, it is inseparable from the real-time positioning of the robot. Especially in the case of indoor dynamic obstacles and crowded environments, there are usually problems of position loss and motion planning failure during the robot navigation process. Therefore, it is very important to provide a positioning method that can achieve high robustness and low computational rate indoors.
[0003] The global positioning of most existing indoor service robots is mainly based on the pose estimation method of Monte Carlo, and the original Monte Carlo is implemented based on the principle of estimating the robot position by a particle filter. The prior art, such as the invention patent with the application publication number CN110986956A, discloses an autonomous learning global positioning method based on an improved Monte Carlo algorithm. By creating a particle filter, reading the current laser and the known map, and obtaining the optimal initial pose through the scan matching formula, the overall accuracy of the particle swarm is improved after adding scan matching. At the same time, the function of automatically giving the initial pose is added by using scan matching, replacing the manual operation of giving the pose by the upper computer, which simplifies the operation. However, since each particle carries pose and weight information, when performing positioning, it is necessary to resample all particles, resulting in a large number of particles that cannot be updated and converged in real time, and there is a problem of high computational complexity; at the same time, since the original Monte Carlo algorithm adapts to a fixed number of particles, there is also a problem that it cannot adaptively recover in time after positioning failure. Summary of the Invention
[0004] The technical solution of the present invention is used to solve the problems of high computational complexity and low real-time adaptability recovery during the robot positioning process.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] A robot autonomous positioning method based on adaptive extended reset, comprising the following steps:
[0007] S1, installing a single-line lidar on a differential robot, and obtaining single-line lidar data, odometer data and a two-dimensional grid map;
[0008] S2, initializing a particle set, each of the particles including a pose and a weight;
[0009] S3. Update the motion based on the odometer data, update the pose of the particles, and calculate the likelihood between the single-line lidar data and the 2D grid map;
[0010] S4. Calculate the new particle weights based on the likelihood;
[0011] S5. Compare the new particle weights with a preset threshold. If the new particle weights are less than the preset threshold, execute S6 for adaptive extended reset resampling; if the new particle weights are greater than or equal to the preset threshold, execute S8 for conventional resampling;
[0012] S6. Calculate the adaptive factor based on the new particle weights, and then calculate the extension parameter based on the adaptive factor;
[0013] S7. Perform adaptive extended reset and update each particle weight, and then execute S9;
[0014] S8. Complete conventional resampling based on the cumulative weights and the uniform sampling interval, and then execute S9;
[0015] S9. Calculate the weighted pose average based on the pose of each particle after sampling to obtain the final pose estimate of the differential robot;
[0016] S10. When new single-line lidar data is received, loop to process the new data and return to execute S3.
[0017] Furthermore, the single-line lidar data in S1 is collected by a single-line lidar installed on the differential robot, the odometer data is obtained according to the kinematic model of the differential robot, and the 2D grid map is known data obtained in advance.
[0018] Furthermore, the specific content of S2 is: Initialize the particle set P = {(p i , w i )}, i ∈ N, where N represents the number of particles, p i represents the pose of the i-th particle, denoted as p i = (x i , y i , θ i ), x i represents the distance of the i-th particle in the x direction, y i represents the distance of the i-th particle in the y direction, θ i represents the direction angle of the i-th particle; w i represents the weight of the i-th particle, denoted as
[0019] Furthermore, the S3 includes:
[0020] S31. Update the motion based on the odometer data to obtain the pose p of the i-th particle at the current time ti_t =(x i_t , y i_t , θ i_t ), where x i_t represents the distance of the i-th particle in the x direction at the current time t, y i_t represents the distance of the i-th particle in the y direction at the current time t, and θ i_t represents the direction angle of the i-th particle at the current time t;
[0021] S32. Calculate the likelihood L(p i ) of the single-line lidar data and the two-dimensional grid map according to the single-line lidar data and the two-dimensional grid map, specifically:
[0022] According to the pose p i_t =(x i_t , y i_t , θ i_t ) of the i-th particle at the current time t, convert the single-line lidar data onto the two-dimensional grid map, and calculate the coordinates of the k-th beam of single-line lidar converted onto the two-dimensional grid map using the following logic:
[0023]
[0024]
[0025] where is the distance measurement value of the k-th beam of single-line lidar at time t, is the angle measurement value of the k-th beam of single-line lidar, are respectively the abscissa and ordinate of the k-th beam of single-line lidar converted onto the two-dimensional grid map;
[0026] According to the improved likelihood calculation formula, calculate the likelihood L(p i ) of the single-line lidar data and the two-dimensional grid map using the following logic:
[0027]
[0028] where d(p i ) represents the distance to the nearest obstacle to the coordinate , and σ is the normalization parameter.
[0029] Furthermore, in S4, calculate the new particle weight w i_new using the following logic:
[0030]
[0031] where L(p i) is the likelihood between the single-line lidar data and the two-dimensional grid map, and N is the number of particles.
[0032] Further, the S6 includes:
[0033] S61. Calculate the adaptive factor λ, which is represented by the following logic:
[0034]
[0035] where α th is a preset threshold, and w i_new is the weight of the new particle;
[0036] S62. For each particle p i =(x i , y i , θ i ) that needs to be reset, calculate the expansion parameters according to the adaptive factor λ; the expansion parameters include the position expansion r e and the angle expansion Δθ max , which are represented by the following logic:
[0037] r e =r min +λ·(r max -r min )
[0038] Δθ max =θ min +λ·(θ max -θ min )
[0039] where r min and r max respectively represent the minimum and maximum expansion radii allowed in the environment, and θ min and θ max respectively represent the minimum and maximum allowed angular offsets.
[0040] Further, the S7 includes:
[0041] S71. Calculate the covariance matrix of the particle set P={(p i_t , w i_t )} at the current time t, where w i_t represents the weight of the i-th particle at the current time t, and the covariance matrix ∑ is represented by the following logic:
[0042]
[0043] where x i_t represents the distance of the i-th particle in the x direction at the current time t, and y i_tDenote the distance of the $i$-th particle in the $y$-direction at the current time $t$ as $w$. i_t The weight of the $i$-th particle at the current time $t$ is The means of the $i$-th particle in the $x$-direction and $y$-direction at the current time $t$ are respectively, and take
[0044] Perform eigenvalue decomposition according to $\sum$ to obtain eigenvalues $\lambda_1$ and $\lambda_2$ and eigenvectors $v_1$ and $v_2$, satisfying $\lambda_1>\lambda_2$.
[0045] When $\lambda_1 < 0.1$, reduce the resampling frequency; when $\lambda_1>0.1$, the particles are dispersed, and execute S72.
[0046] S72: For each particle that needs to be reset, perform extended sampling to obtain each sampled particle, and denote the pose of each sampled particle as $p$ i ′ $=(x$ i ′ , $y$ i ′ , $\theta$ i ′ ), which is represented by the following logic:
[0047]
[0048] Among them, and are respectively the mean in the $x$-direction, the mean in the $y$-direction and the direction value of the particle, Denote the solution of $\sum w$ i_t $\sin\theta$ i_t and $\sum w$ i_t $\cos\theta$ i_t as the arctangent value, $\xi$ x , $\xi$ y , $\xi$ θ are all random offsets of the particle state, which conform to a Gaussian distribution with a mean of 0 and a variance of , which conform to a Gaussian distribution with a mean of 0 and a variance of , and execute step S9.
[0049] Furthermore, the specific content of S8 is as follows: Calculate the cumulative weight $w$ j_c of the first to $j$-th particles and the uniform sampling interval point $u$ i , which is represented by the following logic:
[0050]
[0051] Among them, $w$ j is the weight of the $j$-th particle, $j\in i$, $r$ is a random number from 0 to $1 / N$; for each $u$i , find the corresponding j when u i ≤ w j_c , obtain the pose of each particle after sampling, complete the conventional resampling, and execute step S9.
[0052] An electronic device includes a memory and a processor. The memory is used to store a program that supports the processor to execute the above-mentioned robot autonomous positioning method based on adaptive extended reset. The processor is configured to execute the program stored in the memory.
[0053] A storage medium stores a computer program. When the computer program is run by a processor, it executes the steps of the above-mentioned robot autonomous positioning method based on adaptive extended reset.
[0054] The advantages of the present invention are as follows:
[0055] (1) The present invention first collects data of a single-line lidar, an odometer, and a two-dimensional grid map, and initializes a particle state set; then matches the single-line lidar data with the two-dimensional grid map, calculates the likelihood value and the global matching index of each particle. When the global matching index is less than a set threshold, calculates an adaptive factor, and calculates an extended reset parameter according to the adaptive factor, and performs extended reset on each particle; finally, updates the particle weights using the particle set after extended reset to obtain the current pose of the robot. The present invention can effectively solve the problems of particle degradation and low real-time performance in the robot positioning process, and improve the robustness of robot positioning.
[0056] (2) The present invention simplifies the likelihood calculation model by modifying the likelihood calculation method of the single-line lidar data and the two-dimensional grid map, introducing an improved likelihood calculation formula, reducing invalid calculations. Compared with the point-by-point matching of the traditional AMCL, it can reduce the over-sensitivity to low-error regions, avoid repeated calculations, and achieve a lower computational complexity.
[0057] (3) The present invention introduces a new method for calculating the adaptive factor. By dynamically calculating the adaptive factor and adjusting the position and angle extension parameters, it can adjust the particle extension range in real time according to the positioning situation, adaptively shrink or expand the particle extension range, and reduce the particle number requirement; it can realize the adaptive update of the particle weights when the robot positioning is lost, quickly restore the robot positioning, effectively improve the real-time performance and anti-degradation ability of the robot positioning, and solve the particle degradation problem.
[0058] (4) When the adaptive factor λ approaches 0, r e ≈ r min , Δθ max ≈ θ min, at this time, the expansion range is reduced, and the particles are concentrated in the high-probability area near the true pose of the robot. On the one hand, redundant calculations can be reduced, and on the other hand, the positioning accuracy is improved; when the adaptive factor λ approaches 1, the positioning may have been lost at this time, and the position expansion r e ≈r max , by expanding the particle search range to cover a wider area to restore positioning, and at the same time the angle is also expanded to the maximum allowable range to avoid positioning failure caused by direction deviation. Therefore, by dynamically calculating the adaptive factor λ to dynamically adjust the expansion range, it is possible to avoid wasting particles in the low-probability area, focus computing resources, reduce expansion calculations in the convergence stage, accurately expand in the divergence stage, and reduce the overall calculation amount. The present invention realizes particle update of the position expansion range and the angle expansion range by introducing expansion parameters, and can quickly calculate the robot positioning using a small number of particles, improving the overall positioning efficiency of the robot. Description of the Drawings
[0059] Figure 1 is a flowchart of the robot autonomous positioning method based on adaptive expansion reset in the first embodiment of the present invention;
[0060] Figure 2 is a structural block diagram of the robot autonomous positioning process in the first embodiment of the present invention;
[0061] Figure 3 is an example diagram of observing the robot autonomous positioning at different times based on a visualization tool in the first embodiment of the present invention. Detailed Embodiments
[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0063] The technical solutions of the present invention will be further described below in conjunction with the accompanying drawings of the specification and specific embodiments:
[0064] Embodiment 1
[0065] As Figure 2As shown in the figure, to implement a robot autonomous positioning method based on adaptive extended reset, three coordinate systems must be transformed, namely the base coordinate system, the odometer coordinate system, and the map coordinate system. Among them, the transformation between the base coordinate system and the odometer coordinate system is analyzed by the kinematic model to obtain odometer data. The cumulative error will occur between the odometer coordinate system and the map coordinate system due to long-term movement, and the correct positioning result cannot be obtained. The present invention combines single-line lidar data, odometer data, and two-dimensional grid map to provide a robot autonomous positioning method based on adaptive extended reset to achieve robot positioning. Through adaptive extended reset and dynamic adjustment of the number of particles, the number of particles for real-time update and convergence during positioning can be reduced, the computational complexity can be reduced, and rapid recovery after positioning failure can be achieved.
[0066] As Figure 1 shown, specifically, a robot autonomous positioning method based on adaptive extended reset is disclosed, including the following steps:
[0067] Step S1, install a single-line lidar on the differential drive robot, collect single-line lidar data, and obtain odometer data and two-dimensional grid map.
[0068] In this embodiment, the single-line lidar data is collected by a single-line lidar installed on the differential drive robot, the odometer data is obtained according to the kinematic model of the differential drive robot, and the two-dimensional grid map is pre-obtained known data.
[0069] In this embodiment, the differential drive robot is a common type of mobile robot, and its core feature is to control the movement through two independently driven wheels (usually the left and right wheels). The kinematic model of the differential drive robot describes how the robot realizes translation, steering, rotation and other actions through the speed difference between the left and right wheels, which is the basis of robot navigation, path planning and positioning. The mathematical expression of its kinematic model will not be described here. The two-dimensional grid map in this embodiment refers to a two-dimensional data structure presented in the form of an image according to the visualization algorithm, usually presented in the form of a black and white or color image.
[0070] Step S2, initialize N particle sets, denoted as P = {(p i , w i )}, i ∈ N, where N represents the number of particles, p i represents the pose of the i-th particle, denoted as p i = (x i , y i , θ i ), x i represents the distance of the i-th particle in the x direction, y i represents the distance of the i-th particle in the y direction, θi Denotes the direction angle of the i-th particle; w i Denotes the weight of the i-th particle, denoted as
[0071] Step S3: Perform motion update based on odometer data, update the particle pose, and calculate the likelihood between the single-line lidar data and the 2D grid map; The specific steps of step S3 are as follows:
[0072] S31: Perform motion update based on odometer data to obtain the pose p of the i-th particle at the current time t i_t =(x i_t , y i_t , θ i_t ), where x i_t Denotes the distance of the i-th particle in the x direction at the current time t, y i_t Denotes the distance of the i-th particle in the y direction at the current time t, and θ i_t Denotes the direction angle of the i-th particle at the current time t.
[0073] S32: Calculate the likelihood L(p i ) between the single-line lidar data and the 2D grid map according to the single-line lidar data and the 2D grid map, specifically:
[0074] First, according to the pose p of the i-th particle at the current time t i_t =(x i_t , y i_t , θ i_t ), convert the single-line lidar data to the 2D grid map, and calculate the coordinates of the k-th beam of single-line lidar converted to the 2D grid map Is represented by the following logic:
[0075]
[0076] Where Is the distance measurement value of the k-th beam of single-line lidar at time t, Is the angle measurement value of the k-th beam of single-line lidar, Are the abscissa and ordinate of the k-th beam of single-line lidar converted to the 2D grid map respectively.
[0077] Then, according to the improved likelihood calculation formula, calculate the likelihood L(p i ) between the single-line lidar data and the 2D grid map using the following logic:
[0078]
[0079] Where d(p i ) represents the distance from the coordinate The distance to the nearest obstacle, σ is a normalization parameter, and in this embodiment, σ can be taken as 2 times the resolution of the two-dimensional grid map.
[0080] On the contrary, for the original likelihood L odom (p i ) of the calculation formula:
[0081]
[0082] It can be seen that the improved likelihood calculation formula provided in this embodiment can significantly reduce the complexity of likelihood calculation and improve the calculation efficiency.
[0083] Step S4, calculate the new particle weight w i_new .
[0084] In this embodiment, the new particle weight w i_new is calculated based on the average value of the likelihoods of all particles and is represented by the following logic:
[0085]
[0086] Among them, L(p i ) is the likelihood between the single-line lidar data and the two-dimensional grid map, and N is the number of particles.
[0087] In the traditional Adaptive Monte Carlo Localization (AMCL) algorithm, likelihood calculation is usually based on the point-by-point matching of lidar data and the map. In this embodiment, by introducing an improved likelihood calculation formula and simplifying the likelihood calculation model, it is possible to reduce invalid calculations. Compared with the point-by-point matching of the traditional AMCL, it can reduce the over-sensitivity to low-error regions, avoid repeated calculations, and achieve a lower calculation complexity.
[0088] Step S5, compare the new particle weight w i_new with the preset threshold α th : When w i_new is less than α th , execute step S6 for adaptive extended reset resampling; when w i_new is greater than or equal to α th , execute step S8 for normal resampling. In this embodiment, the preset threshold α th can be taken as α th ∈[0.5, 0.9].
[0089] Step S6, according to the new particle weight w i_new , calculate the adaptive factor λ, and then calculate the expansion parameter according to the adaptive factor λ; the specific steps of step S6 include the following steps:
[0090] S61. Calculate the adaptive factor λ, which is represented by the following logic:
[0091]
[0092] where α th is a preset threshold, and w i_new is the weight of the new particle.
[0093] S62. For each particle p i =(x i , y i , θ i ) that needs to be reset, calculate the expansion parameters according to the adaptive factor λ; the expansion parameters include the position expansion r e and the angle expansion Δθ max , which are represented by the following logic:
[0094] r e = r min + λ·(r max - r min )
[0095] Δθ max = θ min + λ·(θ max - θ min )
[0096] where r min and r max respectively represent the minimum and maximum expansion radii allowed in the environment, which are mainly related to the size of the environmental map. The default values for a small indoor map environment are ±0.05 to ±0.1 meters, and the value range for a large outdoor map is ±0.2 to ±0.5 meters. θ min and θ max respectively represent the minimum and maximum allowed angular offsets, with a default range of -0.2 to 0.2 rad.
[0097] In this embodiment, the position expansion radius (r min and r max ) is dynamically adjusted according to the resolution of the environmental map, while the angular expansion range (θ min and θ max ) is specifically set based on the maximum steering angle of the robot. By dynamically calculating the adaptive factor λ and adjusting the expansion parameters r e and Δθ max according to λ, the particle expansion range can be adjusted in real time according to the positioning situation, adaptively shrinking or expanding the particle expansion range, and reducing the particle quantity requirement. This effectively improves the real-time performance and anti-degradation ability of robot positioning and solves the particle degradation problem.
[0098] For example, when the adaptive factor λ approaches 0, r e ≈ r min , Δθmax ≈θ min , at this time, the expansion range is reduced, and the particles are concentrated in the high-probability area near the true pose of the robot. On the one hand, redundant calculations can be reduced, and on the other hand, the positioning accuracy can be improved; when the adaptive factor λ tends to 1, the positioning may have been lost, and the position expansion r e ≈r max , by expanding the particle search range to cover a wider area to restore positioning, and at the same time the angle is also expanded to the maximum allowable range to avoid positioning failure caused by direction deviation. Therefore, by dynamically calculating the adaptive factor λ to dynamically adjust the expansion range, it is possible to avoid wasting particles in the low-probability area, focus computing resources, reduce expansion calculations in the convergence stage, and accurately expand in the divergence stage, reducing the overall computational effort.
[0099] Step S7, adaptively expand and reset and update the weight of each particle; the specific steps of the step S71 include the following steps:
[0100] S71, calculate the covariance matrix of the particle set P = {(p i_t , w i_t )} at the current time t, where w i_t represents the weight of the i-th particle at the current time t; in this embodiment, the covariance matrix is used to describe the particle distribution characteristics and is used to evaluate the particle positioning uncertainty. The covariance matrix ∑ is represented by the following logic:
[0101]
[0102] where w i_t is the weight of the i-th particle at the current time t, are the means of the i-th particle in the x direction and y direction at the current time t, respectively. Take
[0103] Perform eigenvalue decomposition according to ∑ to obtain eigenvalues λ1 and λ2 and eigenvectors v1 and v2, satisfying λ1 > λ2.
[0104] When λ1 < 0.1, reduce the resampling frequency; when λ1 > 0.1, the particles are dispersed, and execute S72.
[0105] S72, perform extended sampling for each particle that needs to be reset to obtain each sampled particle. Denote the pose of each sampled particle as p i ′ = (x i ′ , y i ′ , θ i ′ ), which is represented by the following logic:
[0106]
[0107] Among them, and are the mean values of the particles in the x - direction, the mean value in the y - direction, and the direction value respectively, represents solving ∑w i_t sinθ i_t and ∑w i_t cosθ i_t the arctangent value of, ξ x , ξ y , ξ θ are all random offset amounts of the particle state.
[0108] Furthermore, conforms to a Gaussian distribution with a mean of 0 and a variance of , conforms to a Gaussian distribution with a mean of 0 and a variance of , and step S9 is executed.
[0109] Step S8, based on the cumulative weight and the uniform sampling interval, complete the conventional resampling, calculate the cumulative weight w j_c of the first to j - th particles and the uniform sampling interval point u i , which is represented by the following logic:
[0110]
[0111] Among them, r is a random number from 0 to , w j is the weight of the j - th particle, w j_c is the cumulative weight of the first to j - th particles, u i is the uniform sampling interval point; for each u i , find the corresponding j that satisfies u i ≤w j_c , obtain the pose of each particle after sampling, complete the conventional resampling, and execute step S9.
[0112] Step S9, according to the pose of each particle after sampling, calculate the weighted pose average value to obtain the final pose estimate p * =(x * , y * , θ * ).
[0113] Step S10, when new single - line lidar data is received, loop to process the new data and return to step S3.
[0114] Figure 3To incorporate the robot autonomous positioning method based on adaptive extended reset provided by the present invention into the autonomous navigation system and visualize the positioning results at different times in the 3D visualization tool RViz based on the Robot Operating System (ROS) framework, which is represented by black arrows, so as to intuitively understand the real-time and accurate positioning of the robot on the map.
[0115] Embodiment 2
[0116] A device includes a memory and a processor. The memory is used to store a program that supports the processor to execute the robot autonomous positioning method based on adaptive extended reset in Embodiment 1, and the processor is configured to execute the program stored in the memory.
[0117] Embodiment 3
[0118] A storage medium stores a computer program, and when the computer program is run by a processor, it executes the steps of the robot autonomous positioning method based on adaptive extended reset in Embodiment 1.
[0119] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0120] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot autonomous positioning method based on adaptive extended reset, characterized in that, It includes the following steps: S1. Install a single-line lidar on the differential robot to obtain single-line lidar data, odometer data, and a two-dimensional grid map; S2. Initialize the particle set, where each of the particles includes a pose and a weight; S3. Perform motion update according to the odometer data, update the particle poses, and calculate the likelihood between the single-line lidar data and the two-dimensional grid map; S4. Calculate new particle weights according to the likelihood; S5. Compare the size of the new particle weights with a preset threshold. If the new particle weights are less than the preset threshold, execute S6 for adaptive extended reset resampling; if the new particle weights are greater than or equal to the preset threshold, execute S8 for conventional resampling; S6. Calculate an adaptive factor according to the new particle weights, and then calculate an expansion parameter according to the adaptive factor; S7. Perform adaptive extended reset and update each particle weight, and execute S9; S8. Complete conventional resampling based on the cumulative weight and the uniform sampling interval, and execute S9; S9. Calculate the weighted pose average according to the poses of each sampled particle to obtain the final pose estimate of the differential robot; S10. When new single-line lidar data is received, loop to process the new data and return to execute S3.
2. The robot autonomous positioning method based on adaptive extended reset according to claim 1, wherein The single-line lidar data in S1 is collected by a single-line lidar installed on the differential robot, the odometer data is obtained according to the kinematic model of the differential robot, and the two-dimensional grid map is known data obtained in advance.
3. The robot autonomous positioning method based on adaptive extended reset according to claim 1, characterized in that S2 is specifically as follows: Initialize the particle set P = {(p i , w i ), i ∈ N, where N represents the number of particles, p i represents the pose of the i-th particle, denoted as p i = (x i , y i , θ i ), x i represents the distance of the i-th particle in the x direction, y i represents the distance of the i-th particle in the y direction, θ i represents the direction angle of the i-th particle; w i represents the weight of the i-th particle, denoted as 4. The robot autonomous positioning method based on adaptive extended reset according to claim 3, characterized in that The S3 includes: S31, perform motion update based on odometer data to obtain the pose p of the i-th particle at the current time t i_t =(x i_t , y i_t , θ i_t ), where x i_t represents the distance of the i-th particle in the x direction at the current time t, and y i_t represents the distance of the i-th particle in the y direction at the current time t, and θ i_t represents the direction angle of the i-th particle at the current time t; S32. Calculate the likelihood L(p i ) between the single-line lidar data and the 2D grid map based on the single-line lidar data and the 2D grid map, specifically as follows: According to the pose p of the i-th particle at the current moment t i_t =(x i_t , y i_t , θ i_t ), the single-line lidar data is converted onto a two-dimensional grid map, and the coordinates of the k-th beam of single-line lidar converted onto the two-dimensional grid map are calculated which is represented by the following logic: Among them, is the distance measurement value of the k-th single-line lidar at time t, is the angle measurement value of the k-th single-line lidar, are the abscissa and ordinate of the k-th single-line lidar converted to the two-dimensional grid map, respectively; According to the improved likelihood calculation formula, the likelihood L(p i ) between the single-line lidar data and the two-dimensional grid map is calculated using the following logic: where d(p i ) represents the distance to the nearest obstacle to the coordinate , and σ is a normalization parameter.
5. The robot autonomous positioning method based on adaptive extended reset according to claim 4, characterized in that In S4, the following logic is used to calculate the new particle weight w i_new : Among them, L(p i ) is the likelihood between the single-line lidar data and the 2D grid map, and N is the number of particles.
6. The robot autonomous positioning method based on adaptive extended reset according to claim 5, wherein, The S6 includes: S61. Calculate the adaptive factor λ, which is represented by the following logic: Among them, α th is a preset threshold, and w i_new is the weight of the new particle; S62. For each particle p to be reset i = (x i , y i , θ i ), calculate the expansion parameters according to the adaptive factor λ; the expansion parameters include the position expansion r e and the angle expansion Δθ max , which are represented by the following logic: r e = r min + λ · (r max - r min ) Δθ max = θ min + λ·(θ max - θ min ) where r min and r max represent the minimum and maximum expansion radii allowed in the environment, respectively, and θ min and θ max represent the minimum and maximum allowed angular offsets, respectively.
7. The robot autonomous positioning method based on adaptive extended reset according to claim 6, wherein The S7 includes: S71, calculate the covariance matrix of the particle set P = {(p i_t , w i_t )} at the current time t, where w i_t represents the weight of the i-th particle at the current time t, and use the following logic to represent the covariance matrix ∑: where x i_t represents the distance of the i-th particle in the x direction at the current time t, and y i_t represents the distance of the i-th particle in the y direction at the current time t, and w i_t is the weight of the i-th particle at the current time t, are the means of the i-th particle in the x direction and y direction at the current time t, respectively. Take Perform eigenvalue decomposition according to ∑ to obtain eigenvalues λ1 and λ2 and eigenvectors v1 and v2, satisfying λ1 > λ2; When λ1 < 0.1, reduce the resampling frequency; when λ1 > 0.1, the particles are dispersed, and execute S72; S72, perform extended sampling for each particle to be reset to obtain each sampled particle, and denote the pose of each sampled particle as p i ′ =(x i ′ , y i ′ , θ i ′ ), which is represented by the following logic: Among them, and are the mean values of the particles in the x - direction, the mean value in the y - direction, and the direction value respectively, represents the solution of ∑w i_t sinθ i_t and ∑w i_t cosθ i_t for the arctangent value, ξ x 、ξ y 、ξ θ are all random offsets of the particle state, which conform to a Gaussian distribution with a mean of 0 and a variance of , which conform to a Gaussian distribution with a mean of 0 and a variance of , and perform step S9.
8. The robot autonomous positioning method based on adaptive extended reset according to claim 5, characterized in that, The specific S8 is as follows: calculate the cumulative weight w of the 1st to jth particles j_c and the uniform sampling interval point u i , which is represented by the following logic: where, w j is the weight of the j-th particle, j ∈ i, r is a random number from 0 to 1 / N; for each u i , find the corresponding j that satisfies u i ≤ w j_c , obtain the pose of each particle after sampling, complete the conventional resampling, and execute step S9.
9. An electronic device, comprising a memory and a processor, characterized in that The memory is used to store a program that supports the processor to execute the robot autonomous positioning method based on adaptive extended reset according to any one of claims 1 to 8, and the processor is configured to execute the program stored in the memory.
10. A storage medium, on which a computer program is stored, characterized in that, When the computer program is run by the processor, it executes the steps of the robot autonomous positioning method based on adaptive extended reset according to any one of claims 1 to 8.
Citation Information
Patent Citations
Global fusion positioning method based on self-adaptive Monte Carlo and feature matching
CN109682382A
Autonomous learning global localization method based on improved Monte Carlo algorithm
CN110986956A
Mobile robot positioning method based on improved antelope optimized particle filtering and two-dimensional code
CN118010030A
Robot dynamic target searching and tracking method based on adaptive particle filter tree
CN118897541A
Three-dimensional laser positioning method and system
WO2021109166A1