Indoor mobile robot positioning method based on same transformation synchronous correction

By using a synchronous correction method based on the same transformation, the pose is deduced using a wheel encoder and gyroscope, and combined with quality gating and multi-frame point cloud repositioning, the reliability and continuity of positioning results during the positioning process of indoor mobile robots are solved, achieving efficient positioning recovery and output.

CN123175293APending Publication Date: 2026-11-27HANGZHOU DIANZI UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611708773.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-11-02
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing indoor mobile robot positioning technologies, there are problems with the reliability and continuity of positioning results. In particular, when the matching results are inaccurate, the anomaly correction processing is inconsistent, and the pose output is discontinuous, the positioning deviation continues to expand.

Method used

A method based on synchronous correction of the same transformation is adopted. The robot pose is deduced by using the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope. Laser point compensation and matching are performed at a unified reference time. The matching result is judged by quality gating to ensure that the global correction transformation is applied to all poses within the deduction cycle. Combined with multi-frame point cloud re-localization and time-limited output mechanism, the reliability and continuity of pose are achieved.

Benefits of technology

It improves the reliability and continuity of the positioning process, reduces positioning deviations caused by anomaly detection, ensures timely recovery in abnormal situations, avoids unnecessary repositioning and repeated corrections, and reduces the complexity of sensor configuration and calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123175293A_ABST
    Figure CN123175293A_ABST
Patent Text Reader

Abstract

The application provides an indoor mobile robot positioning method based on the same transformation synchronous correction, which only updates the current pose according to the wheel encoder linear velocity and the gyroscope z-axis angular velocity in a deduction period and writes the finite length history pose buffer; the reference pose is obtained by inquiring the buffer with the laser scanning end time as the unified reference time, each laser point is compensated to the reference time according to the corresponding relative motion of the time difference, the reference pose is taken as the priori in the distance field to perform the coarse search and the fine matching, the matching pose corresponding to the reference time is obtained, the matching pose is executed by the gate according to multiple quality indexes, the current pose is not corrected when the matching pose does not pass, the coordinate transformation of the reference pose to the matching pose is determined as the global correction transformation when the matching pose passes, the deduction is continuously performed during the matching, the current pose and all recorded history poses in the buffer are multiplied by the left of the global correction transformation in the next deduction period, and the current frame is not processed again after the writing back.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of indoor mobile robot autonomous positioning technology, specifically relating to an indoor mobile robot positioning method based on synchronous correction of the same transformation. Background Technology

[0002] Autonomous localization of indoor mobile robots typically requires completion on a pre-built two-dimensional environmental map. This process generally involves matching real-time scans from a two-dimensional LiDAR scanner with the map. A common approach is to use a pose extrapolator composed of wheel odometry and inertial measurement data to provide a predicted pose at the moment of laser scanning. Motion distortion of a single frame of laser points is removed by combining the motion state during the scan. Coarse candidate poses are obtained through correlation search near the predicted pose, and then a finely matched pose is obtained through nonlinear optimization. The localization result is then used for subsequent map building or pose optimization. Patent document CN120084300A describes a scheme that uses inertial and wheel speed information to form a predicted pose, performs coarse matching of laser correlation in the vicinity of the prior, and then performs fine matching using nonlinear optimization and grid interpolation values ​​and their gradients. Patent document CN113503876A describes a scheme that uses lidar, odometer, and gyroscope to construct a two-dimensional map and perform scanning matching. This scheme uses point-by-point timestamps and pose transformation to remove motion distortion from laser points. When the matching score is insufficient, the search range is gradually widened, the score threshold is lowered, and global relocalization is initiated. When matching is unreliable, the predicted pose is used as the final pose. It is evident that pose extrapolation, motion distortion removal, coarse-to-fine matching, and grid or range field costs are all already employed in this field.

[0003] To improve the reliability and continuity of positioning results, existing solutions have proposed improvements from several angles. Patent document CN116840820A proposes a scheme that uses indicators such as the average matching degree, distance ratio score, laser penetration ratio, and average distance, combined with corresponding thresholds, to determine whether two-dimensional laser positioning has been lost. Patent document CN109144056A proposes switching the positioning state and performing repositioning based on map regions or local maps when the matching score is insufficient. In addition, some solutions switch to a trajectory estimation mode and limit the local search range based on the estimated pose when point cloud matching is unreliable, or maintain multiple system states including pure odometry and recovery states and switch states based on matching scores and anomaly detection results. Regarding output, existing solutions improve the frequency of pose output or the smoothness of the trajectory by interpolating poses at multiple discrete moments or performing continuous-time modeling of the motion trajectory. These improvements apply to different stages of the positioning process, mainly by relaxing the judgment threshold, switching working modes, or post-processing the output results to address anomalies.

[0004] In practice, the above processing methods still have the following problems. Regarding the determination of matching results, the judgment conditions are often composed of isolated thresholds. Matching results with insufficient points, degraded local geometry, or abnormal single correction amounts may still pass the judgment. Unreliable corrections, once written into continuous poses, will be continuously propagated over time through subsequent pose deductions, causing the positioning deviation to persist and potentially amplify further with deduction errors. Regarding the organization of correction and recovery, the determination of positioning anomalies, the execution of pose corrections, and the triggering of repositioning are usually handled by separate modules, lacking a holistic connection from quality judgment to correction execution and even failure confirmation and recovery. The processing boundaries and state attribution of abnormal results are not clear enough. There is also often a lack of a unified mechanism for distinguishing between temporary anomalies and persistent failures. Short-term matching noise may trigger unnecessary repositioning, while persistent failures may be difficult to recover from due to insufficient observation information. Furthermore, localization corrections are typically applied only to the current pose. This can lead to inconsistencies in coordinate relationships between previously recorded poses and the current pose within the same time window, affecting historical pose lookup interpolation, temporal correlations between laser points, and the reference relationships used for motion distortion removal. On the output side, pose output frequency is usually higher than map matching frequency. The time difference between the two needs to be filled by pose extrapolation. If extrapolation lacks constraints, poses derived solely from the extrapolation may be presented as reliable map localization results when matching is unavailable for extended periods. Conversely, if the extrapolation capability does not match the pose snapshot update cycle, the output pose may prematurely stall.

[0005] In view of this, how to enable the anomaly detection and handling, pose correction, confirmation and recovery of temporary and persistent failures, and continuous pose output in the positioning process to operate collaboratively under a unified coordinate relationship and state constraints without relying on inertial measurement acceleration integration, so as to ensure the reliability of the provided pose during normal operation and to re-output a reliable pose after the positioning recovers from the failure state, has become a technical problem that needs to be solved. Summary of the Invention

[0006] To address the shortcomings and deficiencies of existing technologies, this invention provides an indoor mobile robot localization method based on synchronous correction using the same transformation. This method operates on a pre-constructed distance field, using only the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope to deduce the robot's two-dimensional pose. The deduce pose and its timestamp are written to a finite-length historical pose cache. For the current frame of laser scanning, the end time of the frame scan is used as a unified reference time. The reference pose at that time is retrieved from the historical pose cache, and the relative motion of each laser point relative to that time is compensated to the unified reference time, ensuring that the deduce pose and the matched pose are at the same moment. Using the reference pose as a priori, a coarse search and fine matching are performed on the compensated laser points in the distance field to obtain the matched pose. Before correcting the current pose with this matched pose, a quality gating is performed based on multiple matching quality indicators; if the gating fails, the matched pose is not used for correction. When the gating passes, the coordinate transformation from the reference pose to the matched pose is determined as the global correction transformation. Since the inference continues during the matching period, in the inference cycle after the matching is completed, the same global correction transformation is used to left-multiply the current pose of the inference cycle and all historical poses recorded in the historical pose cache, and then written back. This ensures that the reference pose lookup and coordinate relationship of subsequent frames remain consistent, and the current frame that has already been processed does not need to be reprocessed. When the quality gating fails for a set number of consecutive times, multiple frames of laser point cloud are accumulated within a set time window, and repositioning is performed on the same range field. The repositioned pose is verified by the quality gating and used to reset the inference chain and clear and rebuild the historical pose cache. The pose output is performed by an output thread independent of the pose matching, based on the pose snapshot, and the output stops during the point cloud accumulation and repositioning.

[0007] This invention provides an indoor mobile robot localization method based on synchronous correction of the same transformation. The method calculates the robot's current pose using only the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope according to a calculation cycle, and writes the calculated pose and its timestamp into a finite-length historical pose cache. For the current frame of laser scanning, the end time of the frame scan is used as a unified reference time. The reference pose is retrieved from the historical pose cache and compensated to the unified reference time based on the relative motion corresponding to the time difference of each laser point relative to the unified reference time. On a pre-constructed distance field, the compensated laser points are coarsely searched and finely matched using the reference pose as a priori to obtain the position corresponding to the unified reference time. Matching pose; performing quality gating on the matched pose based on multiple matching quality indicators, if it fails, the matched pose is not used to correct the current pose; when it passes the quality gating, the coordinate transformation from the reference pose to the matched pose is determined as the global correction transformation. The inference continues during the matching period. In the inference period after the matching is completed, the current pose of the inference period and all historical poses recorded in the historical pose cache are multiplied by the same global correction transformation and written back. The current pose of the inference period is the pose obtained by continuing the inference from the unified reference time. After writing back, no compensation and matching are performed on the laser scan of the current frame.

[0008] The reason for using only the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope, without using the acceleration integral output from the inertial measurement unit, is that the planar motion of the indoor wheeled robot can be described by the longitudinal linear velocity and the directional angular velocity. However, the acceleration channel, lacking effective observations, will continuously introduce errors during the simulation due to zero bias and noise, requiring additional calibration and filtering. A unified reference time is taken as the end time of the scan for that frame, ensuring that the reference pose obtained from the query and the matched pose obtained from the matching correspond to the same moment. The difference between the two represents the coordinate deviation of the matching result relative to the simulation result, excluding the body motion that occurs during the matching calculation. If other times are used as the reference, the simulation pose and the matched pose do not correspond in time, and the coordinate transformation determined accordingly cannot reflect the true correction amount. The relative motion on which the compensation of each laser point is based can be obtained from the relative transformation between the unified reference time and the simulation pose at the laser point acquisition time, or it can be determined from the linear velocity and angular velocity within that time difference. The above compensation depends only on the relative motion between laser points within the same frame, and its correctness does not depend on the value of the pose in the global coordinate system. The global rigid body transformation does not change the relative geometric relationship between points within the frame. Therefore, after the global coordinates are corrected as a whole, the relative relationship between points within the frame remains unchanged.

[0009] By placing quality gating before correction, the decision is made before the writing is completed. If any metric is not met, the matching pose is rejected. This can prevent matching results with insufficient points, degraded local geometry, or abnormal single correction magnitude from entering the continuous pose and being continuously transmitted through subsequent deductions.

[0010] The matching calculation takes time, during which pose extrapolation continues. Therefore, when the correction is actually applied, the robot's current pose has already been extrapolated from the unified reference time to a later time. Multiplying the current pose of this extrapolation cycle by the same global correction transformation aligns the coordinate reference to the map coordinate system while preserving the motion increment extrapolated between the unified reference time and the injection time. This is different from directly assigning the current pose as the matching pose. Multiplying all historical poses recorded in the historical pose cache by the same transformation and writing them back places the records in the cache and the current pose in the same coordinate relationship. Here, all historical poses recorded refer to valid records in the cache with non-zero timestamps. Slots that have not yet been written to or have been cleared are not involved in the left multiplication. Overwritten old records are no longer in the cache, and new valid records written after overwriting still participate in the synchronization correction. Since the reference poses of subsequent frames are retrieved from this cache, without this synchronous correction, the reference poses retrieved in subsequent frames will still be in the old coordinate relationship, losing a unified coordinate reference with the compensation of laser points in those subsequent frames. Furthermore, the correction amount determined by subsequent frames based on the uncorrected reference poses will again include the previously applied corrections, resulting in redundant corrections. The relative motion calculated across correction moments will also be affected by this correction. Because the poses in the cache are uniformly corrected using the same global correction transformation, the relative pose relationships between historical poses within the cache remain unchanged. This uniform correction only completes coordinate alignment and does not eliminate positioning errors at each historical moment. Compensation and matching are no longer performed on the laser scan of the current frame after write-back because compensation and matching were already completed before the global correction transformation was determined. The global rigid body transformation does not change the relative geometric relationships between points within the frame, and the processed current frame will not become invalid due to cache correction.

[0011] Furthermore, when the number of consecutive failures of the quality gating reaches a set number, pose output is stopped, and multiple frames of laser point cloud are accumulated within a set time window. The accumulated point cloud is then repositioned on the distance field. The repositioned pose must be verified by the quality gating, where the translation correction and rotation correction are taken from the correction conditions corresponding to this repositioning. If the verification passes, the pose is used as the absolute pose to reset the current pose, the historical pose cache is cleared and rebuilt, and the laser scans accumulated during the repositioning are discarded. If the verification fails, the point cloud is re-accumulated or a positioning failure is reported. This absolute pose is used as the prior pose for coarse search in subsequent matching cycles. Using continuous counting rather than single judgment as the condition for entering repositioning can distinguish between short-term matching anomalies and continuous failures: single or a few matching anomalies are usually caused by occlusion, local geometric degradation, or transient noise, in which case inference can be used to maintain pose updates; while multiple consecutive failures indicate that the inference results are no longer reliable priors, and more observation information is needed to re-establish the correspondence between the model and the map. The repositioned pose is still verified according to gating conditions before being used for reset. The correction condition is the limit corresponding to this repositioning, and its acceptable correction range is different from the correction range relative to the prior pose during normal operation. The correction condition during normal operation is independent of the correction condition corresponding to this repositioning, each limiting the correction range within the trusted neighborhood of its respective reference pose. The current pose is reset with the absolute pose, and the historical pose cache is cleared and rebuilt, so that the recovered inference chain no longer carries the state accumulated only by inference during the failure period. Discarding the laser scans accumulated during repositioning avoids the influence of these laser frames acquired under the old coordinate relationship on the newly established coordinate relationship. This absolute pose is used as the prior pose for coarse search in subsequent matching cycles, allowing the recovery process to connect with the normal matching loop. Optionally, the set number of times is 5, the set time window is 1.5 seconds, the maximum translation correction corresponding to this repositioning is 1.5 meters, and the maximum rotation correction is 45 degrees.

[0012] Furthermore, the multiple matching quality indicators include: the number of valid points before and after fine matching is not less than a first set value, where valid points are laser points whose range is within the set range, whose distance field query is valid, and whose distance value is limited; the number of interior points after fine matching is not less than a second set value, where interior points are laser points among the valid points whose distance field distance value is less than the interior point threshold; the average value of the distance values ​​of the valid points after truncation is not greater than a third set value, and the average value after fine matching is not higher than the sum of the average value before fine matching and a fourth set value; the translation correction of the matched pose relative to the reference pose is not greater than a fifth set value, and its rotation correction is not greater than a sixth set value; if any of the above conditions are not met, the matched pose is not used to correct the current pose. The effective point count ensures a sufficient number of observations for judgment, avoiding insufficient data when there are too few laser points. The interior point count and interior point threshold work together to confirm that the point cloud as a whole closely approximates the obstacle structure in the map, rather than only a few points falling near the obstacle. The truncated average distance value limits the overall deviation between the candidate pose and the map structure; truncating the distance of a single point can suppress the dominant effect of a very small number of distant points on the average value. The comparison of the average values ​​before and after fine matching confirms that the optimization process itself improves the matching quality rather than worsens it. The upper limit of the translation and rotation correction is used to regulate a single calibration within the credible neighborhood of the prior pose. Optionally, the range is 0.10 meters to 8.0 meters, the first setting is 30, the second setting is 25, the interior point threshold is 0.20 meters, the distance truncation value is 1.0 meter, the third setting is 0.35 meters, the fourth setting is 0.03 meters, the fifth setting is 1.8 meters, and the sixth setting is 40 degrees.

[0013] Furthermore, the distance field is a truncated non-negative Euclidean distance field, in which the distance value of the obstacle position is zero, and the distance values ​​of other positions are determined by the distance from that position to the nearest obstacle position and the map resolution, and the maximum truncated distance is taken when it exceeds the maximum truncated distance; in the coarse search and fine matching, the score of the coarse search, the residual of the fine matching, the analytical gradient of the residual relative to the pose component, and the distance in the quality gating are all determined based on the same distance field; the coarse search searches for candidate poses within a set range around the reference pose, and uses the candidate poses whose scores meet the set conditions as the initial values ​​for fine matching; if none of the scores meet the set conditions, the search range is expanded and candidate poses are regenerated. The score is the average value of the effective laser point distance field values ​​under the candidate pose after truncation, and the smaller the score, the higher the degree of matching. The truncation method allows distance values ​​on the map to increase with distance from obstacles, and then become constant after exceeding a certain upper limit. This preserves distance information in nearby areas while reducing the impact of areas far from obstacles on the score. It also avoids distinguishing between the positive and negative signs of the obstacle side and the free side, ensuring that the distance values ​​used for scoring, residuals, and gating are calculated under the same orientation, preventing discrepancies in caliber between search, optimization, and decision-making due to different sign conventions. Furthermore, by unifying the distance values ​​in the coarse search score, fine matching residuals and analytical gradients, and quality gating from the same distance field, the evaluation criteria used in the search phase, the minimized objective in the optimization phase, and the distance levels used in the decision-making phase have consistent meaning. This prevents systematic deviations between the initial search values ​​and the optimized results due to different map representations. Optionally, the maximum cutoff distance is 2.0 meters; the coarse search is performed within a range of ±1.5 meters in the longitudinal and lateral directions and ±35 degrees in the heading around the reference pose, with a step size of 0.10 meters and 2.5 degrees, and the set condition is that the average cutoff value of the effective laser point distance under each candidate pose is not greater than 0.32 meters; the point-by-point cutoff value used for scoring here is the same value as the parameter of the same name used for scoring in the repositioning stage, both being 0.5 meters; the grid with an undetermined occupancy status is calculated normally according to its distance to the nearest obstacle grid and cut off according to the maximum cutoff distance.

[0014] Further, the query to obtain the reference pose includes: when the end time of the scan is between the timestamps of two adjacent records in the historical pose cache, the poses of the two records are interpolated according to the timestamps of the two records; when the end time of the scan is later than the latest timestamp in the historical pose cache, the latest available pose is taken as the reference pose; the historical pose cache is a circular cache, and when it is full, the new record overwrites the oldest record, and the write-back includes writing the current pose after left multiplication as a new record into the historical pose cache; the deduction includes: constructing a planar motion velocity vector with the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope, updating the pose through SE(2) exponential mapping, the second component of the velocity vector is always zero, representing that the lateral velocity in the vehicle coordinate system is zero, and the heading angle increment is the product of the z-axis angular velocity and the time interval of the deduction period; the deduction does not use the acceleration integral output by the inertial measurement unit. Interpolating the poses of adjacent records by timestamps ensures that the reference pose obtained from the query is closer in time to the end of the scan, avoiding time deviations caused by record intervals. Interpolation can be performed using Lie algebra linear interpolation or linear interpolation of position and heading respectively. When the end of the scan is later than the latest record in the cache, the latest available pose is retrieved, allowing the query to return results without interrupting the localization process. A circular cache is used, and the oldest record is overwritten when full, keeping the cache's storage usage constant while always storing pose records from the most recent period. The write-back process involves writing the current pose, after left multiplication, as a new record into the cache, extending the cache chronologically and maintaining a consistent coordinate relationship with the synchronously corrected historical poses. The deduction takes the midpoint of the left and right drive wheel axis as the reference point for vehicle motion. Under the condition of planar motion and ignoring lateral slippage, nonholonomic constraints are introduced to make the lateral velocity in the vehicle coordinate system zero. The planar motion velocity vector is constructed by the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope. The pose is updated uniformly by the SE(2) exponential mapping. The main deduction logic does not set a branch to switch between the linear model and the constant curvature model according to the angular velocity threshold. The linear approximation can be used as the equivalent numerical expression of the exponential mapping in the case of small angular velocity. The heading angle increment is calculated by multiplying the gyroscope z-axis angular velocity and the time interval of the deduction cycle. The heading change is not directly discarded because the angular velocity is small. Optionally, the capacity of the historical pose cache is 256 items. When using 400 Hz inertial measurement data, the cache covers about 0.64 seconds. The actual time stamp of the valid record in the cache shall prevail.

[0015] Furthermore, the relocalization includes: downsampling the accumulated point cloud to obtain sampling points, and when a prior pose exists, searching for candidate poses by scoring them in the range field around the prior pose. If the prior heading is valid, the search is performed within a first heading range; if the prior heading is invalid, the search is performed within a second heading range greater than the first heading range. If the best score obtained from the search exceeds a switching threshold or no prior pose exists, the search range is expanded to the complete physical boundary of the map corresponding to the range field and the complete heading range. The candidate pose must enable more than a set proportion of sampling points to complete a valid range field query. A valid prior heading means that the heading corresponding to the most recent positioning result that passed the quality gating before failure is available; the prior heading is invalid when the initial heading after power-on is unknown or no available positioning result exists. Downsampling the accumulated point cloud can reduce the scoring overhead of a single candidate pose while maintaining the overall structural characteristics of the point cloud, making a larger-range search possible. When a prior pose is available, the surrounding area is searched first, which is the processing order under the condition of reliable prior information. Different heading search ranges are used when the prior heading is valid and invalid. This is because when the heading is unknown, it is necessary to find possible directions within the entire heading range, while when the heading is known, only a limited range needs to be corrected. When the best score obtained from the local search exceeds the switching threshold or there is no prior pose, the search is expanded to the entire map boundary and the entire heading range, so that relocalization can still be completed in the absence of reliable prior information. Candidate poses are required to enable a valid distance field query for more than a set proportion of sampled points. This can exclude candidate poses that cause a large number of sampled points to fall outside the map or fail to obtain valid distance values, avoiding such poses from receiving excessively high evaluations due to a large number of sampled points not participating in the scoring. The validity of the prior heading refers to whether there is a reliable heading reference before this search. The heading corresponding to the most recent positioning result that passed the quality gating before the failure is one such case. Optionally, the downsampling sampling points are approximately 120 points, and laser points with a range greater than 0.3 meters and less than 6.0 meters are retained to remove vehicle body occlusion points that are too close and sparse background points that are too far away; the first heading range is ±30 degrees, the second heading range is ±180 degrees, the search range around the prior pose is ±1.5 meters in both the longitudinal and lateral directions, the search step size is 0.2 meters and 5 degrees, and the switching threshold is 0.35 meters; the point-by-point cutoff value used for scoring in the repositioning stage is 0.5 meters, which is not equal to the maximum cutoff distance of the range field. The former is used to limit the contribution of a single sampling point to the scoring, and the latter is used to limit the range of distance values ​​on the map; the setting ratio is 50%.

[0016] Further, the accumulation of multi-frame laser point clouds includes: extracting laser points from each frame of laser scanning according to a set extraction ratio, the number of accumulated laser points not exceeding a set upper limit, and using the difference between the end time of the current frame of laser scanning and the start time of the first frame of laser scanning being greater than a set duration as the accumulation end condition; before starting accumulation, performing any of the following processes: requesting the issuance of a stop command, and performing a stationary confirmation based on the latest wheel encoder linear velocity and gyroscope z-axis angular velocity, starting accumulation only when the stationary condition continuously meets the preset duration and the motion data does not exceed the timeout, and continuously checking the stationary condition during accumulation and repositioning matching; or, in motion, compensating each frame of laser points to the coordinate system of the same reference time based on the continuously derived relative pose before accumulation. Among them, extracting laser points according to a set extraction ratio and setting an upper limit on the cumulative number can keep the accumulated point cloud at a controllable amount of data while obtaining observation information from multiple frames, and avoid the storage of the accumulation process and the computational overhead of subsequent matching increasing over time; using the difference between the start time of the first frame scan and the end time of the current frame scan as the termination condition, the accumulation window has a definite boundary in time, thus adapting to the actual scanning rhythm of the lidar. Before accumulation begins, a stop command is requested and a stationary confirmation is performed. Accumulation begins after the stationary condition is continuously met for a preset duration and the motion data has not timed out. During accumulation and repositioning matching, the stationary condition is continuously checked to ensure that the accumulated multi-frame point clouds correspond to observations near the same location, preventing misalignment between frame point clouds caused by robot movement during accumulation. In motion mode, the laser points of each frame are compensated to the same reference time coordinate system based on the continuously derived relative pose before accumulation, ensuring that the point clouds of different frames are at the same coordinate reference before accumulation. The kinematics used for the above cross-frame processing are consistent with the temporal compensation of laser points within the same frame, the difference being that the former applies to point clouds of different frames while the latter applies to laser points within the same frame. Optionally, the extraction ratio is one point extracted every ten original points, the upper limit is set to 2048 points, and the set duration is 1.5 seconds.

[0017] Furthermore, the fine matching uses the bilinear interpolation value of the range field as the residual, and the sum of squares of the residuals after weighting by a robust kernel function as the optimization objective. The analytical gradient is calculated by combining the interpolation gradient and the Jacobian of the 2D pose transformation, with the number of iterations not exceeding a set upper limit. If the pose obtained from the fine matching fails the quality gate, but the initial value passes the check using the same inlier count condition, average cost condition, and correction amount condition as the quality gate, then that initial value is used as the matched pose. Using the bilinear interpolation value of the range field as the residual ensures that the residual directly reflects the distance between the laser point and the map obstacle structure. The analytical gradient is obtained by combining the interpolation gradient and the Jacobian of the pose transformation, avoiding the additional computation and accuracy loss caused by approximating the gradient using numerical differences. Using the sum of squares after weighting by a robust kernel function as the optimization objective reduces the impact of individual laser points with significantly larger distances on the optimization results. Limiting the upper limit of the number of iterations keeps the computational load of a single fine matching process controllable. Since the range field is constant and its gradient is zero in the region exceeding the truncation limit, residuals located in this region do not influence optimization. Laser points participating in residual establishment are screened based on range and query validity, while also suppressing invalid residuals. If the pose obtained from fine matching fails quality gating while the initial value passes the same check, and this initial value is used as the matching pose, resulting in no improvement or even a decrease in matching quality, the frame can still be provided with a pose based on the qualified search results. This processing does not lower the judgment criteria. Optionally, the robust kernel function uses the Huber robust kernel with a scale parameter of 0.15 meters and an upper limit of 12 iterations. Laser points participating in residual establishment must have a range between 0.10 meters and 8.0 meters and be able to complete a valid and limited range field query at the initial value position, with a residual count of no less than 30.

[0018] Furthermore, after each processing of the gyroscope z-axis angular velocity data and absorption of possible global correction transformations, the extrapolation thread sends the latest pose snapshot along with the linear and angular velocities at that moment to the output thread, which is independent of the pose matching thread. Starting from the moment the pose snapshot is received, the output thread calculates and outputs the pose based on the linear and angular velocities within 0.01 seconds. After 0.01 seconds, the output pose is no longer extended forward. Extrapolation output is stopped during the accumulation of multiple frames of laser point cloud and during repositioning. The output thread determines whether the snapshot update has timed out based on the actual elapsed time since the last received pose snapshot. If the timeout exceeds the preset update timeout threshold, normal pose output is paused, and output is resumed after obtaining a new snapshot that meets the timeliness conditions. The sending period of the pose snapshot is no more than 0.01 seconds. The output thread operates independently of pose matching, allowing pose output to be provided at shorter intervals even when map matching is time-consuming, without waiting for each map match to complete. Linear and angular velocities are sent along with the pose snapshot, ensuring that the motion parameters used for extrapolation and the snapshot pose originate from the same extrapolation moment, preventing inconsistencies. The extrapolation duration is limited by the moment the pose snapshot is received, keeping the extrapolation range confined to the vicinity of the most recent snapshot. Beyond this limit, the pose stops expanding, preventing the use of extrapolated poses to replace map localization results when no new snapshots are received for extended periods. Extrapolation output is stopped during the accumulation of multiple laser point clouds and during relocalization, as map localization results are unavailable during these phases, and continuing to output extrapolated poses could easily confuse them with reliable map localization results. The pose snapshot sending cycle does not exceed the upper limit of the extrapolation duration, ensuring the extrapolation time between snapshots remains within a usable range, preventing premature cessation of pose output due to untimely snapshot updates. By determining whether the snapshot update has timed out based on the actual elapsed time, and pausing normal pose output after the timeout, obtaining a new snapshot that meets the timeliness conditions, and then resuming, it is possible to avoid continuously outputting an extrapolated pose that is gradually becoming distorted when the snapshot update is abnormal.

[0019] This invention also provides an indoor mobile robot positioning device based on synchronous correction of the same transformation, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described indoor mobile robot positioning method. The processing steps such as pose deduction, matching calculation, and pose output in the above method can be handled by independent threads. Threads exchange pose, motion quantities, and global correction transformations atomically by sharing data. Functions such as pose deduction and maintenance of historical pose cache, unified compensation of laser points, coarse search and fine matching, quality gating, determination and application of global correction transformations, repositioning, and time-limited extrapolation output are all implemented by the processor executing the computer program stored in the memory.

[0020] Compared with the prior art, the present invention and its preferred solutions have at least the following beneficial effects through the above technical solutions.

[0021] Since quality gating is placed before correcting the current pose with the matched pose, and is jointly judged by multiple matching quality indicators, matching results with insufficient points, degraded local geometry, large average deviation, or abnormal single correction magnitude are difficult to pass the judgment. The possibility of unreliable corrections being written into continuous poses and propagated to subsequent time windows through subsequent pose deduction is reduced accordingly. Since the global correction transformation determined by the transformation from the reference pose to the matched pose is applied simultaneously to the current pose and all historical poses recorded in the historical pose cache for one iteration after the matching is completed, the correction is no longer limited to updating a single current pose. The coordinate relationship used when querying the reference pose, performing historical interpolation, and forming the matching reference in subsequent frames can remain consistent, and the coordinate system misalignment between different data sources within the same time window is reduced accordingly. Furthermore, since the simulation continues during the matching period, this correction uses the matching result at the end of the scan as the anchor point and retains the motion increment obtained during the matching period, which is different from the processing method of directly assigning the current pose to the matched pose. Moreover, since the global rigid body transformation does not change the relative geometric relationship between laser points within the same frame, the current frame that has already completed compensation and matching does not need to be reprocessed.

[0022] Because of the interconnectedness of continuous failure counting, multi-frame point cloud accumulation within a set time window, repositioning in the same distance field, and re-establishment of the inference chain by restoring the pose, temporary matching anomalies and persistent failures can be distinguished and handled, and short-term matching noise is less likely to cause unnecessary repositioning; the pose obtained by repositioning must be verified by the same quality gating to ensure that the adoption standard of the recovery channel is consistent with the adoption standard of the normal operation phase; the inference chain is hard reset with absolute pose and the historical pose cache is rebuilt so that the restored inference chain does not carry the state accumulated only by inference during the failure period; the laser scans accumulated during repositioning are discarded to avoid the laser frames acquired under the old coordinate relationship from affecting the newly established coordinate relationship. Furthermore, since the coarse search score, the fine matching residual and its analytical gradient, and the distance quantity in the quality gating are all taken from the same distance field, there is no need to switch the map representation between normal localization and failure recovery, avoiding coordinate and dimension conversion between different representations. The use of analytical gradient also avoids the extra computation and accuracy loss caused by numerical difference. In terms of search organization, during normal operation, the search is preferentially performed within a small range around the prior pose. The search range is only expanded when the score does not meet the set conditions. Large-range search is only enabled in a few cases. When the fine matching fails the quality gating but the initial value passes the check under the same conditions, the initial value is used as the matching pose. This provides a limited remedial approach for single-frame matching while keeping the judgment criteria unchanged.

[0023] Because map matching and timed extrapolation output are handled by independent threads, pose output during normal operation does not need to wait for each map matching to complete. The extrapolation duration is constrained by an upper limit, and the pose snapshot sending cycle matches this upper limit. Output stops after entering point cloud accumulation or re-localization mode. During the recovery phase, the pose obtained solely from the extrapolation is not provided as a reliable map localization result. Furthermore, pose extrapolation only uses the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope without performing acceleration integration, thus lowering the threshold for sensor configuration and calibration. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the overall architecture of the indoor mobile robot for continuous positioning according to an embodiment of the present invention;

[0025] Figure 2 This is a schematic diagram of the positioning data processing flow according to an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram of the positioning state transition according to an embodiment of the present invention;

[0027] Figure 4 This is a schematic diagram of the coarse search and fine matching process according to an embodiment of the present invention;

[0028] Figure 5 This is a timing diagram of a single running matching cycle according to an embodiment of the present invention;

[0029] Figure 6 This is a schematic diagram illustrating the process of creating, deploying, and replacing location maps according to an embodiment of the present invention. Detailed Implementation

[0030] To make the features and advantages of the present invention more apparent and understandable, specific embodiments are described below in detail:

[0031] (I) Overview of the Plan

[0032] This invention is aimed at indoor mobile robots that operate on an existing offline two-dimensional grid map. The localization link can be summarized into eight stages: pose inference, timing compensation, coarse search, fine matching, quality gating, correction injection, failure recovery and timed output. It is unified by a unified distance field expression, a unified time anchor point and a unified state constraint.

[0033] In terms of coordinate representation, the offline occupancy raster map is pre-converted into a truncated non-negative Euclidean distance field. This distance field is used simultaneously for scoring local coarse search, scoring relocation coarse search, constructing residuals for nonlinear fine matching and obtaining their analytical gradients, as well as for calculating distance quantities in quality gating. Since the coarse scoring, residuals, and gradients share the same distance field and its bilinear interpolation representation, there is no need to switch map representation formats between normal localization and failure recovery, avoiding coordinate and dimensional conversions between different representations.

[0034] In terms of time reference, the laser points in this frame are uniformly compensated to the reference time corresponding to the end time of the scan in this frame. The map matching pose and the inferred pose are compared semantically at the same time. The resulting global correction transformation is injected into the pose chain that is still being inferred during the matching period and the historical pose cache. The output thread then completes high-frequency output in a short-time extrapolation manner. The scan start time, scan end time, matching completion time, correction injection time and output time in the entire matching cycle have a fixed sequence relationship, so the data dependencies of each stage are therefore deterministic.

[0035] In terms of state constraints, the availability of a matching result is jointly determined by multiple quality indicators during the running state. When the number of consecutive matching failures reaches a set number, the system enters a multi-frame point cloud accumulation state within a set time window and performs repositioning on the same distance field in a manner that first local and then full-map. After successful repositioning, the inference chain is hard reset with absolute pose, and the old laser frames accumulated during the repositioning are discarded, and then the system returns to normal operation.

[0036] like Figure 1 As shown, the system includes a map preprocessing module M1, a sensor input module M2, a high-frequency pose estimation and history cache module M3, a laser timing compensation module M4, a local and global coarse search module M5, a range field fine matching module M6, a quality gating and correction injection module M7, a failure accumulation and relocation module M8, and an asynchronous short-time extrapolation output module M9. Specifically, after passing quality gating, M7 feeds back the global correction transformation to M3, which is used to apply the same transformation correction to the current pose and the historical pose cache. The recovery result of M8 is fed back to M3 for hard reset of the estimation chain and reconstruction of the historical cache. The absolute pose obtained from the relocation is used as a coarse search prior in subsequent matching cycles. Figure 1 The line connecting M1 to M2 indicates that the offline construction of the distance field is completed before the localization operation; the distance field generated by M1 is used by M5, M6, M7 and M8 for scoring, residual construction, quality gating and relocalization during operation.

[0037] like Figure 2As shown, the localization data processing flow includes step S101 loading the map and parameters; step S102 performing pose deduction based on wheel speed and angular velocity; step S103 performing temporal compensation on laser points; step S104 performing a local coarse search, expanding the search range and regenerating candidate poses if the score is unqualified; step S105 performing fine matching and quality gating; step S106 injecting corrections and outputting normally when the gating is passed; and step S107 entering the failure accumulation and re-localization branch when the gating continues to fail. The pose deduction is continuously executed during system operation. Steps S102 and S103 are shown side-by-side in the figure to indicate that within the same frame, pose deduction and laser point temporal compensation are performed independently and then merged into the coarse search stage.

[0038] (II) System Composition, Inputs and Outputs

[0039] The system includes a map preprocessing module M1, a sensor input module M2, a high-frequency pose extrapolation and history caching module M3, a laser timing compensation module M4, a local and global coarse search module M5, a distance field fine matching module M6, a quality gating and correction injection module M7, a failure accumulation and relocation module M8, and an asynchronous short-time extrapolation output module M9.

[0040] The inputs include an offline 2D occupancy grid map and its resolution, origin, and size metadata, a 2D laser scan point sequence, linear velocities converted from the left and right wheel encoders, gyroscope z-axis angular velocities, and timestamps for various data. The outputs include the robot's SE(2) pose in the global map coordinate system, the most recently corrected pose, the current matching quality, and the localization status.

[0041] This invention uses the average left and right wheel speeds and the gyroscope's z-axis angular velocity, without using the acceleration integral of the inertial measurement unit (IMU). Therefore, the system's pose estimation does not depend on the calibration and integration accuracy of the acceleration channel. As a preferred implementation, the encoder resolution can be selected as 1024 lines. This embodiment uses an IMU with an output frequency of 400 Hz. The estimation thread updates the pose one sample at a time based on newly acquired valid IMU data. When data is received and processed normally and in a timely manner, the nominal period for pose estimation and pose snapshot updates is approximately 0.0025 seconds, less than the 0.01-second extrapolation time limit described later. The pose output snapshot release period is no greater than this extrapolation time limit. The actual update interval is also affected by data arrival, thread scheduling, and computation time. Map matching, pose estimation, and pose output within the system are handled by independent threads. Threads exchange pose and correction values ​​through shared data and atomic mailboxes. The aforementioned functions, such as map preprocessing, sensor reading, pose estimation, laser timing compensation, coarse search and fine matching, quality gating, failure recovery, and pose output, are all implemented by the processor executing the computer program stored in the memory.

[0042] (III) Offline map distance field construction

[0043] M1 denotes the set of obstacle grid cells in the occupied grid map as... Raster resolution is denoted as The maximum cutoff distance is denoted as For any grid Constructing a truncated nonnegative Euclidean distance field:

[0044] (1)

[0045] in, The grid for calculating the distance field value is represented by the grid row and column coordinates; For obstacle grid set Any obstacle grid in the grid; The two-dimensional Euclidean distance between two grids, in grid units; This is the map resolution, measured in meters per grid, used to convert grid distances into physical distances in meters. This is the upper limit of the distance cutoff. For grid The distance field value at a given location is expressed in meters.

[0046] The distance to the obstacle in the field is zero; positions farther from the obstacle are... The distance is truncated, and the sign of the obstacle side and the free side is not distinguished, so it is a truncated non-negative form. As a preferred implementation, the maximum truncation distance is 2.0 meters, the map resolution is 0.05 meters per grid, the distance values ​​are saved in float32 format, and saved as a distance field binary file in row priority order.

[0047] In coordinate transformation, global physical coordinates Based on map resolution and map origin, the distance field grid coordinates are converted. The conversion process considers the correspondence between the image row direction and the map vertical axis to ensure consistency between the raster coordinates of the distance field and the map coordinates. As a preferred implementation, unknown graticules are calculated normally based on their distance to the nearest obstacle graticule, and then... Truncation, or processing in the same way as free grids, ensures that any laser point falling within the physical boundaries of the map receives a finite distance value. This processing is a natural result of binarization using a uniform grayscale threshold and distance transformation during map preprocessing, rather than a separate identification or exclusion mechanism for unknown areas.

[0048] (iv) High-frequency pose extrapolation and historical pose caching

[0049] M2 reads left and right wheel speeds and and the z-axis angular velocity of the gyroscope M3 calculates the average speed of the left and right wheels. and during the sampling interval Update pose using the following formula:

[0050] (2)

[0051] in, For the first SE(2) pose at each projection moment, Given their previous pose, both were... Homogeneous transformation matrix representation; For the first The average speed of the left and right wheels within each simulation cycle, in meters per second; The z-axis angular velocity of the gyroscope during this period is expressed in radians per second. The sampling interval for this period is expressed in seconds. The exponential mapping of the SE(2) Lie group is used to map the Lie algebra vector into a pose transformation matrix; the value of the second component in the exponential mapping is always zero, which is used to characterize that the lateral velocity in the vehicle coordinate system is zero; the lateral velocity being zero does not mean that the lateral displacement relative to the vehicle coordinate system at the beginning of the cycle is zero during the turning process.

[0052] In this embodiment, the midpoint of the left and right drive wheel axis is used as the reference point for vehicle motion. Under the condition of planar motion and ignoring lateral slippage, a nonholonomic constraint is introduced, making the lateral velocity in the vehicle coordinate system zero. A planar motion velocity vector is constructed using the longitudinal linear velocity provided by the wheel encoder and the z-axis angular velocity provided by the gyroscope. The pose is updated uniformly through the SE(2) exponential mapping. The main derivation logic does not set a branch to switch between the linear model and the constant curvature model based on the angular velocity threshold. The linear approximation can be used as an equivalent numerical expression of the exponential mapping in the case of small angular velocities. In this embodiment, it is not used as an independent branch criterion. Except for the near-stationary joint zeroing process described below, the heading increment is calculated as the product of the gyroscope z-axis angular velocity and the sampling time interval. The heading change is not directly discarded because the angular velocity is small. As a preferred implementation, when the absolute value of the linear velocity of the wheel encoder is less than 0.002 m / s and the absolute value of the z-axis angular velocity of the gyroscope is less than 0.002 radians / s, the linear velocity and angular velocity used for the derivation in this cycle are both set to zero to suppress the pose change caused by the continuous integration of small measurement values ​​under near-static conditions; this joint zeroing process is different from the small angle numerical approximation process. Since the positioning system uses the SE(2) pose in the two-dimensional plane as the state variable, the above derivation does not involve attitude updates in the roll and pitch directions, and there is no need to introduce acceleration integration.

[0053] After processing the gyroscope z-axis angular velocity data each time (the acceleration channel is not used in the deduction), M3 writes the corresponding timestamp and SE(2) pose into a circular history cache with a capacity of 256 entries. When the cache is full, the oldest entry is overwritten with the newest record. Therefore, the actual length of time the cache covers is determined by the arrival frequency of the inertial measurement data. As a preferred implementation, this embodiment uses 400 Hz inertial measurement data. Under normal reception and timely data processing, the cache covers approximately 0.64 seconds. The actual coverage time is based on the timestamp of the valid record in the cache. The map matching thread uses the laser scan end time. Query the historical cache to obtain the reference pose Its query strategy is: when When located between two adjacent historical nodes, the SE(2) pose is interpolated according to the timestamps of the two nodes. The interpolation can be performed using Lie algebra linear interpolation or linear interpolation of position and heading respectively; when When the time is later than the latest time in the cache, the latest available pose is used for zero-order preservation. The above query method ensures that the reference pose corresponds to the end time of the scan in time, providing a premise for subsequent semantic comparison between the matched pose and the inferred pose at the same time.

[0054] In this embodiment, each historical pose in the cache is retained, and the same correction transformation is applied to them uniformly. The same transformation is used to uniformly correct all valid poses in the cache, keeping the relative pose relationships between each historical pose unchanged, and retaining the motion increments obtained during the matching period. Its purpose is to make the current pose and the historical cache uniformly complete coordinate alignment, rather than eliminating the positioning errors at each historical moment.

[0055] (v) Timing compensation of two-dimensional laser points

[0056] M4 is based on the point sequence in a point cloud. The time difference between the point and the corresponding time between points is estimated, and the point is transformed to the unified reference time. During the compensation period, the motion of the body corresponding to the point is approximated as a constant vehicle speed, that is, the linear velocity and z-axis angular velocity at the time of the evaluation are used.

[0057] (3)

[0058] in, For the first The coordinates of the original laser point in the sensor coordinate system at the time of acquisition; To compensate for the laser point coordinates after reaching a unified reference time; From the data acquisition time at this point to the unified reference time The time difference, measured in seconds, indicates that the point was collected earlier than the unified reference time; and These are the linear velocity and z-axis angular velocity used to evaluate the point at that moment, with dimensions of meters per second and radians per second, respectively. The negative sign before the exponential mapping indicates that points collected earlier than the reference moment are transformed in reverse from their own coordinate system to the coordinate system of the reference moment.

[0059] The unified reference time is taken as the end time of the laser scan in this frame. That is, the map matching thread uses The pose obtained from querying the historical cache serves as the compensation reference for the point cloud in that frame. As a preferred implementation, the inter-point time is estimated with a fixed value. In this embodiment, the retained laser points are stored in the order of reception and parsing, with index i starting from 0 and then... The time difference between each point and the end of the frame is estimated per second, where N is the total number of laser points retained in the current frame; earlier points correspond to larger time differences, and the last retained point corresponds to zero time difference. Reverse counting of point order is an equivalent representation of this notation. As another implementation, when the lidar provides point-by-point timestamps or complete sampling sequence numbers, the time difference can be directly calculated using the point-by-point timestamps and... The difference is determined Using reliable point-by-point timestamps or retaining the complete original sampling sequence number can be considered as a further improvement to the implementation.

[0060] The aforementioned compensation depends only on the relative motion between points within the same frame; therefore, its correctness does not depend on the frame's pose value in the global coordinate system. When the laser points in that frame are subsequently subjected to a uniform global rigid body transformation, the relative geometric relationships between points within the frame remain unchanged. This property means that subsequent global pose corrections will not invalidate the already compensated current frame, and the current frame does not need to re-execute temporal compensation and matching.

[0061] (vi) Local coarse search and full-map backtracking coarse search

[0062] M5 is in the projected pose at the end of the scan during normal operation. As a priori, candidate poses are searched within a local area of ​​±1.5 meters in both the longitudinal and transverse directions, and ±35 degrees in the heading direction, with search step sizes of 0.10 meters and 2.5 degrees, respectively. The local coarse search cost during normal operation is defined as the average of the cutoff distances of all valid points under the candidate poses:

[0063] (4)

[0064] in, Candidate poses for scoring; The laser point after compensation by equation (3); This indicates the position of the point after transformation to the map coordinate system; The value is a bilinear interpolation of the range field, obtained by interpolating the values ​​of the four adjacent range field grids at this location, and its dimension is meters; This is a point-by-point cutoff value, measured in meters, used to suppress the excessive influence of individual distant points on the score; The set of points among the sampling points participating in the coarse search that can complete an effective and finite distance field query. Its points; The local coarse search cost is expressed in meters. Since the search window during normal operation is small and the prior pose is usually close to the true value, most laser points can complete the effective search. Therefore, normalizing the number of effective points can reflect the overall fit of the candidate pose. As a preferred implementation, the point-by-point truncation value in equation (4) The parameter with the same name in equation (5) takes the same value, which is 0.5 meters. However, the two treat invalid query points differently: the normal local coarse search skips invalid points, while the repositioning coarse search adds a 0.5-meter penalty to each invalid point. Therefore, the two costs should be defined separately.

[0065] As a preferred implementation, the local candidate poses during normal operation must ensure that the number of valid query points is not less than 45% of the total number of sampled points. Candidate poses that do not meet this condition are directly judged as unusable.

[0066] When the minimum cost of local coarse search is not greater than the threshold When the pose is initially set, it serves as the initial value for the nonlinear fine matching. When the minimum cost of the local coarse search exceeds this threshold or the local search fails to yield usable results, the program expands the search range, regenerates candidate poses, and then scores them again. As a preferred implementation, A value of 0.32 meters is used. To control the computational load of the coarse search, the laser points involved in the scoring can be uniformly downsampled first, and a multi-resolution search order from coarse to fine can be adopted. Under the current search parameters, the number of local candidate poses during normal operation is about 28,000. By appropriately downsampling the laser points in a single frame before scoring, the computation time of the coarse search in a single frame can be controlled within the allowable range of real-time processing.

[0067] When the system enters the relocation state, a coarse search is performed on the accumulated point cloud. The accumulated point cloud is first dynamically downsampled to approximately 120 points, and only points with a range greater than 0.3 meters and less than 6.0 meters are retained to eliminate points that are too close to the vehicle body and too far from the sparse background. Candidate poses must ensure that more than 50% of the sampled points fall within the effective area of ​​the range field; this condition is used to exclude candidate poses that fall outside the physical boundaries of the map or where a large number of points cannot obtain effective distance values. The cost of the coarse search in the relocation state is defined as:

[0068] (5)

[0069] in, To participate in the coarse search sampling points for relocation, From 1 to the total number of sampling points ; Candidate pose The following is a set of points that can be used to perform effective distance field queries. Its points; This is the click cutoff value for the number of points for which a valid query could not be completed. By incorporating costs, the scoring can simultaneously reflect the average deviation of valid points and the coverage of valid points. To reposition the point-by-point truncation values ​​of the coarse search, the upper limit of the truncation for the map distance field is used. Since they are not equal, we take 0.5 meters here; The unit of measurement for the coarse search cost is meters. The absolute value notation in equation (5) is used to maintain consistency with the non-negative values ​​of the distance field, which also holds true in implementations where the distance field is replaced with a signed form.

[0070] Equation (5) uses the number of valid points as the normalized denominator, meaning that the cost simultaneously reflects the average deviation on valid points and the coverage of valid points. The smaller the value, the closer the candidate pose is to the map obstacle structure and the more sufficient the effective coverage is on most sampling points. This score can be called the normalized cost including invalid point penalties. In this embodiment, it is first determined whether the number of valid query points exceeds 50% of the total number of sampling points. Only when this condition is met is the total score divided by the number of valid points. When entering the division calculation, the denominator must be greater than zero. Candidate poses with zero valid points are not divided and do not participate in the optimal candidate update. Their cost is recorded as infinity, which can be used as a mathematical equivalent description.

[0071] The coarse search strategy for repositioning is as follows: when a prior pose exists, search within ±1.5 meters in both the longitudinal and transverse directions of the prior pose; when the prior heading is valid, the heading search range is ±30 degrees; when the prior heading is invalid, the heading search range is ±180 degrees; and the search step size is 0.2 meters and 5 degrees respectively. When the local optimal average cost exceeds a threshold... Alternatively, if no prior pose exists, the search range is expanded to include the complete map physical boundaries and the heading range from 0 degrees to 360 degrees. This is a preferred implementation. Take 0.35 meters. The validity of the prior heading here refers to whether there was a reliable heading reference before this search, such as whether the heading corresponding to the most recent gating positioning result before failure was usable. When the initial heading upon power-on is unknown or there were no usable positioning results before failure, the prior heading is deemed invalid. Since the number of candidate poses for full map backtracking can reach millions, this backtracking is only activated when the aforementioned local search fails or there is no prior heading, and only a small number of downsampled points are scored to control the time consumed by a single re-localization.

[0072] It should be noted that the threshold Compared to the average cost ceiling in gating discussed later. These are two independent parameters. Although both are measured in meters, they are used to determine the cost criterion for repositioning the coarse search and the gating criterion for the matching results, respectively. In practice, they are assigned values ​​according to their respective uses.

[0073] like Figure 4 As shown, the coarse search and fine matching process includes step P1 inputting the prior pose, step P2 converting the point cloud and map to the same coordinate system, step P3 generating local candidate poses, step P4 scoring the candidate poses using the range field, step P5 expanding the search range based on the current positioning state when the score is unqualified, step P6 performing fine matching using analytical gradients, and step P7 executing multi-level quality gating. Among them, step P5 distinguishes two types of backoff based on the current positioning state: during normal operation, if the local score is unqualified, the search range is expanded and candidate poses are regenerated; during the repositioning period, if the best score of the local search exceeds the switching threshold or there is no prior pose, the search range is expanded to the complete physical boundary of the map corresponding to the range field and the complete heading range for re-scoring. Both backoff paths return to step P3.

[0074] (vii) Fine matching of nonlinear range field

[0075] For candidate poses obtained through coarse search, M6 performs nonlinear optimization on continuous coordinates. (Point...) The residual is defined as:

[0076] (6)

[0077] in, For point In candidate position The residuals below, in meters; This is a bilinear interpolation value for the range field, which is interpolated based on the values ​​of four adjacent range field grids; The position of the points participating in fine matching after transformation to the map coordinate system through candidate pose; For the general notation of the point set participating in fine matching, during normal operation, the laser points in the current frame that have undergone time-series compensation according to formula (3) and meet the fine matching selection conditions are taken. During the repositioning period, all laser points retained in the cumulative buffer are taken, and residuals are established after filtering based on the range, query validity under the initial value, and the finiteness of distance values, rather than directly using the sampling point set of the coarse search. When using the static accumulation method, the laser points in each frame correspond to observations near the same location, which can be directly used as the fine matching point set; when using the motion-compensated accumulation method, the fine matching point set is the accumulated point set after cross-frame motion compensation to the same reference time.

[0078] The optimization objective of fine matching is the sum of squares of the residuals after robust kernel weighting, i.e., solving for... ,in For robust kernel functions, the Huber robust kernel is adopted as the preferred implementation, with a scale parameter of 0.15 meters. The residuals are relative to the pose components. , , The gradient is obtained by combining the distance field interpolation gradient with the Jacobian matrix of the SE(2) transformation: first, the partial derivative of the bilinear interpolation with respect to the grid coordinates is directly calculated based on the distance values ​​of the four adjacent grids. and Then, by combining the SE(2) transform Jacobian, the analytical gradient of the residual relative to the pose component is obtained, thereby avoiding the extra computation and accuracy loss caused by numerical difference.

[0079] Fine matching only establishes residuals for points with a range between 0.10 meters and 8.0 meters that can complete an effective and finite distance field query at the initial position. The number of residuals participating in the optimization must be no less than 30, and the maximum number of iterations is 12. After the iteration is completed, the fine-matched pose is output. The costs before and after optimization, and the corresponding statistics. Since the distance field takes a constant value in the region exceeding the cutoff upper limit, its gradient is zero in this region. The residuals located in this region do not have a pulling effect on optimization. Therefore, the above-mentioned range and the selection of effective queries simultaneously play the role of suppressing invalid residuals.

[0080] (viii) Multi-level quality gating and synchronous correction injection

[0081] During normal operation, M7 performs multi-level quality gating on the fine matching results. The gating is completed before correcting the writing of continuous poses.

[0082] Valid points are defined as laser points with a range between 0.10 meters and 8.0 meters, valid in the range field query, and with limited distance values. The number of valid points, both before and after optimization, must be no less than 30. Inner points are defined as valid points with a range field distance value less than 0.20 meters. The number of inner points, after optimization, must be no less than 25. These are used to confirm that the point cloud as a whole closely approximates the obstacle structure in the map, rather than only a few points falling near obstacles. The gating average cost is the average of the range field distance values ​​of all valid points truncated to 1.0 meter, expressed in meters, and must not exceed the upper limit of the average cost. This limits the average deviation between candidate poses and the map structure; simultaneously, it requires that the optimized average cost not exceed the unoptimized average cost plus 0.03 meters, to avoid the optimization process itself degrading the matching quality. As a preferred implementation, A distance of 0.35 meters is used as the cutoff value, and 1.0 meter is used as the cutoff value for the distance. This is the normal operating position relative to the reference pose. The maximum translational correction and maximum rotational correction are 1.8 meters and 40 degrees, respectively, used to limit a single correction to a reliable neighborhood of the prior pose. If any of the above conditions are not met, the nonlinear correction will not be written into the continuous pose.

[0083] When the nonlinear correction fails to pass the gating but the local coarse search is effective, the program checks the coarse search pose again with the same interior point conditions, average cost conditions, effective point number conditions, and correction amount conditions of 1.8 meters and 40 degrees. If it passes, the coarse correction pose can be published directly, thus providing a limited remedial channel for single-frame matching while keeping the gating standard unchanged.

[0084] During normal operation, reference pose The calculated pose corresponding to the unified reference time for this frame of laser scanning is defined as the scanning end time. The corresponding inferred pose is obtained by querying the historical pose cache according to the aforementioned interpolation or zero-order preservation strategy; For the same Map matching pose under temporal semantics. Matching end time. Calculate the global correction transform:

[0085] (7)

[0086] in, This is a global correction transformation used to correct the inferred coordinate system to the map matching coordinate system; To precisely match the output pose; For reference pose; This is the inverse of the reference pose.

[0087] During the matching calculation, the high-frequency inference thread continues to run. The next inertial data processing time... When it arrives, the current pose has usually already changed. Continuing the extrapolation to a later point in time, therefore Usually not equal to The program uses the same Left multiplication The current pose at any given moment, along with all valid historical poses with non-zero timestamps in the 256-item circular cache, are then written into the new historical node:

[0088] (8)

[0089] in, The value represents the current pose at the injection moment. The value on the left represents the pose after injection, and the value on the right represents the pose before injection. For the ring cache A valid historical pose with a non-zero timestamp; the left arrow indicates the position as pressed. Update, which involves left-multiplying the transformation and writing it back.

[0090] The above processing does not directly assign the current pose value. If we take for Position at any moment, with To match the obtained pose, the matching period is determined by Deduction to The accumulated increment of bodily movement satisfy Left multiplication Later obtained It is evident that the effect of correction is to... The matching result at any given time is used as the anchor point. to The motion increments derived during the process are retained, while only the reference coordinate system is aligned to the map coordinate system. These motion increments are still affected by wheel speed, gyroscope measurement errors, and approximations of the motion model. The above explanation is limited to the incremental correction branch during normal operation; the absolute pose reset after repositioning will be explained separately. The same transformation is applied to the current pose and all valid historical poses, ensuring that subsequent frame queries of the scanned pose, historical interpolation, and the formation of matching references are all within the same coordinate relationship, thus avoiding coordinate system misalignment between different data sources within the same time window.

[0091] Because the current laser frame is being calculated Temporal compensation and matching have already been completed, and the relative geometric relationships within the frame remain unchanged under the global rigid body transformation. Therefore, after correcting the historical cache, temporal compensation or re-matching will not be re-executed for the current frame. The corrected historical cache is used by subsequent frames to query the end-of-scan pose and maintain consistency with subsequent coordinate relationships. As a preferred implementation, when the translation correction is less than 0.002 meters and the rotation correction is less than 0.1 degrees, the correction is deemed meaningless, and the global correction transformation is not published to avoid numerical jitter in the continuous pose. As another preferred implementation, the global correction transformation is passed between the deduction thread and the matching thread via an atomic mailbox to avoid concurrent writing of shared pose values ​​by the two threads.

[0092] (ix) Failure confirmation, point cloud accumulation and relocation

[0093] The localization state is logically divided into four phases: normal operation (Q1), consecutive failure counting logic (Q2), point cloud accumulation (Q3), and relocation (Q4), managed by the failure accumulation and relocation module M8. Q2 is not an independent enumerated state, but rather a counting logic for consecutive failures within the running state: When the first four matching failures occur, the system remains running, and high-frequency inference and pose output continue; when any matching passes the quality gate, the consecutive failure count is reset to zero, and the matched pose is recorded as the most recent pose that passed the quality gate; after the fifth consecutive failure, this recorded pose is used as the prior pose for relocation, and the prior heading is marked as valid; upon initial startup or if the recorded pose does not exist, no prior pose is set, and the prior heading is deemed invalid. The system resets the accumulated point set and enters Q3, while the inference thread clears the old motion inputs and historical poses, and the output thread stops sending poses.

[0094] When the system starts up for the first time (corresponding to) Figure 3 The robot enters Q3 from the initial startup entry point. In this scenario, the robot is assumed to have come to a complete stop and remains stationary throughout the 1.5-second point cloud accumulation window, then proceeds to Q4 to complete the initial repositioning. This stationary state is a condition for device startup, guaranteed by the operator or the upper-level workflow. As a preferred implementation, the program can request a stop command from the upper-level scheduling system before entering the accumulation window and confirm stationary status based on the latest left and right wheel speeds and gyroscope z-axis angular velocity before starting accumulation, ensuring that the accumulated point cloud does not produce motion blur due to robot movement. For the implementation of accumulation after stopping, during startup initialization or positioning recovery, a stop request is first made through the chassis control interface, and the latest left and right wheel speeds and gyroscope angular velocity are continuously read. When the absolute values ​​of both the left and right wheel speeds and angular velocity are below a preset threshold, maintained for a preset duration, and the motion data does not time out, the robot is confirmed to be stationary. Then, the previously accumulated point set is cleared, laser frames collected before the stationary confirmation are excluded, and accumulation restarts. This embodiment can use an accumulation window of approximately 1.5 seconds. During the accumulation period, the stationary condition is continuously checked. If movement resumes or the motion data becomes invalid, the current accumulated point set is cleared, the accumulation timer is reset, and the system waits for stationary confirmation again. If the parking request fails or the waiting time for stationary status expires, the system does not directly enter the accumulation matching process. The stationary state is also maintained during the repositioning matching process. If the robot resumes movement, the matching result corresponding to the current stationary window is not directly used to restore the current pose.

[0095] When a robot re-enters Q3 after five consecutive matching failures during normal operation, as a preferred implementation, the aforementioned stop confirmation or static criterion check can be performed before accumulation. Alternatively, the laser points of each frame can be transformed to a unified reference system based on the deduced pose before accumulation to suppress the accumulated point cloud trailing caused by robot motion. The kinematics used for cross-frame motion compensation are consistent with those used for intra-frame temporal compensation, the difference being that the former applies to point clouds in different frames while the latter applies to point sequences within the same frame. If cross-frame motion compensation is adopted, the implementation method with a static window as the accumulation premise can be considered an independent preferred embodiment. For the implementation method of accumulation in motion, the relative pose deduction driven by wheel speed and gyroscope is continuously maintained during the recovery period. After intra-frame motion distortion compensation is performed on the scan, the laser points are uniformly transformed to the robot coordinate system of the same reference time based on the relative pose at the corresponding time of each frame before accumulation. After matching the pose at the reference time, the subsequent relative motion is converted to the recovery time.

[0096] Both entry points directly accumulate continuous laser frames within a 1.5-second time window. During accumulation, one point is extracted from every 10 original points, and the accumulation array can store a maximum of 2048 points. Taking a 2D lidar operating at a nominal 10 Hz as an example, the 1.5-second window corresponds to approximately 15 to 16 frames. Each frame contains approximately 540 points, which, after a 10:1 extraction, results in approximately 54 points. The accumulated number of points is approximately on the order of 800 points, not exceeding the upper limit of 2048 points. The actual number of frames is determined by the timestamp of each frame scan and the accumulation end condition. The end condition is that the difference between the end time of the current frame scan and the start time of the first frame scan is strictly greater than 1.5 seconds.

[0097] Upon entering Q4, the repositioning continues to use the same truncated non-negative range field as during normal operation, without switching to normal distribution transformation or iterative nearest point algorithm. The program first performs a local coarse search or a full-map backtracking coarse search according to the aforementioned strategy, and then performs nonlinear fine matching using the coarse search pose as the initial value and correction reference. The maximum translation correction and maximum rotation correction of the nonlinear fine matching in the repositioning state relative to the coarse search pose are 1.5 meters and 45 degrees, respectively. In this embodiment, during the accumulation phase, sampling is performed by retaining one point every set number per frame, and the number of accumulated points does not exceed a set upper limit; the repositioning coarse search further samples from this accumulated point set to form a small coarse search point set; the fine matching uses the entire accumulated retained point set as input, and constructs residuals after filtering according to the range and the effective, finite range field query conditions, rather than directly using the small point set of the coarse search. As an optional implementation, when computational resources are limited, a further downsampled point set can be used for fine matching, and its point set selection rules and corresponding quality verification conditions can be clearly defined; more points participating in fine matching can retain more environmental information.

[0098] When the nonlinear fine matching passes the gating, an optimized pose is used; otherwise, a coarse search pose is used. To ensure that the output of the recovered result is consistent with the standard during normal operation, regardless of which of the two poses is used, the final recovered pose must be verified using the same valid point count conditions, interior point conditions, average cost conditions, and maximum translation and rotation correction conditions corresponding to this repositioning as during normal operation. Only after the verification passes is the shared pose written and used for hard reset; if the verification fails, the repositioning is deemed a failure, and the point cloud is re-accumulated or the positioning failure is reported to the upper layer. Further, in this embodiment, the coarse search for repositioning outputs a valid flag while outputting candidate poses; if no valid candidate is found, the repositioning is deemed a failure. The reference object for the correction amount is: the reference pose at the end of the scan during normal operation. For reference, the fine matching is repositioned using the pose obtained from the coarse search as a reference, with maximum translation and rotation corrections of 1.5 meters and 45 degrees, respectively. After finding a valid candidate, its pose is used as the initial value for fine matching; if the fine matching passes the original gating, the optimized pose is used; if the fine matching fails, a basic quality check is performed separately on the coarse search candidate, and only after passing the check is back to the original candidate allowed. Both types of recovered candidates should meet the basic conditions of finite pose, no less than 30 valid query points, no less than 25 interior points, and an average gating cost of no more than 0.35 meters; where interior points are points with an absolute distance of less than 0.20 meters, the average gating cost follows the definition of the average of the absolute distances of valid query points truncated by 1.0 meter, and is calculated separately from the coarse search score. Translation and rotation conditions should specify the reference objects: the estimated pose check correction amount relative to the scanning reference time during normal operation; the fine-tuning range relative to the coarse search pose check during repositioning and fine matching, in this embodiment, limits of 1.5 meters and 45 degrees can be retained; the absolute pose obtained by full-map repositioning is not constrained by the normal operation correction amount limit relative to the failed old pose. Coarse search rollback is based on map matching quality acceptance; when there are additional credible priors, a consistency check relative to those priors can be set separately. If both the optimized pose and the coarse search rollback pose fail the corresponding verification, the restored pose will not be written, the inference chain will not be reset, the normal pose output will not be restored, and the static confirmation and point cloud accumulation process will be returned to try again, or the positioning failure will be reported to the upper layer.

[0099] The final absolute pose is written to the shared initial pose and incremented by the epoch identifier. The shared initial pose is the repositioning starting pose exchanged atomically between the inference thread and the matching thread. Upon detecting a new epoch, the inference thread hard-writes the current pose as this absolute pose and clears and rebuilds the history cache. Simultaneously, the matching thread discards the old laser frames accumulated during repositioning and then resumes operation. This hard reset, rather than incremental correction, ensures that the recovered inference chain no longer carries the errors accumulated during unobserved inference during repositioning, while also preventing the old laser frames accumulated during the recovery phase from contaminating the newly established coordinate relationships.

[0100] like Figure 3 As shown, the positioning states include normal operation state Q1, continuous failure counting logic Q2, multi-frame point cloud time window accumulation state Q3, and repositioning state based on the same distance field Q4. The system remains operational after the first four matching failures. After the fifth consecutive failure, the system stops normal pose output, clears the previous accumulated point set, and begins effective point cloud accumulation after meeting the corresponding conditions according to the selected recovery implementation method: When using the stationary accumulation method after parking, parking and stationary confirmation are completed first, then accumulation begins in Q3. During the confirmation waiting period, the latest motion data is continuously acquired. If confirmation fails or the waiting timeout occurs, the system waits again and confirms once more. When using the motion compensation accumulation method, relative pose deduction is continuously maintained during the recovery period. Accumulation is performed after compensating the laser points of each frame to the coordinate system of the common reference time. Q3 enters Q4 after the accumulation window ends. After Q4 completes the absolute pose hard reset, it returns to Q1. If the verification fails or no valid candidate is found, it returns to Q3 to re-accumulate.

[0101] (x) Asynchronous time-limited extrapolation output

[0102] The M9 and map matching threads run independently. Each time the inference thread processes the gyroscope's z-axis angular velocity data and absorbs any possible global correction transformations, it captures the latest pose snapshot. Send to the output thread; when the output thread receives this snapshot, it uses a monotonic clock to record the receiving time. . This refers to the receiving time of the output thread, not the laser sensor timestamp, nor specifically the time of the most recent map matching. Output Time The pose is:

[0103] (9)

[0104] in, This is the latest pose snapshot released by the derivation thread, which has absorbed the global correction transformation. To output the pose at the moment of output; and These are the linear velocity and z-axis angular velocity used for extrapolation, respectively; This is the output time; This is the monotonic clock moment at which the output thread receives this snapshot; Extrapolation duration; This is the upper limit of the extrapolation duration, which is 0.01 seconds in the running state.

[0105] The extrapolation thread publishes the average wheel velocity and angular velocity at the same moment as the pose snapshot. The output thread directly uses the motion parameters attached to the snapshot to perform extrapolation, ensuring that the motion parameters used for extrapolation and the snapshot pose come from the same extrapolation moment. The maximum value operation in the inner layer guarantees... Non-negative means that the extrapolation duration is zero when the output time is earlier than the snapshot reception time; the outer minimum value operation limits the extrapolation duration to... Within. When no new snapshot is received and Exceed At that time, the program still outputs the pose according to the sending cycle, but The upper limit is fixed, and the output pose will not be extended further. This embodiment uses 400 Hz inertial measurement data input. When data is received and processed normally and in a timely manner, the nominal period for pose estimation and snapshot updates is approximately 0.0025 seconds, less than the extrapolated upper limit of 0.01 seconds. The actual update interval may still increase due to data interruption or thread delay; therefore, this configuration does not guarantee that the snapshot update interval will not exceed 0.01 seconds in all cases. In this embodiment, the output thread uses the actual elapsed time before throttling. Determine if snapshot update timeout: When Between When between the update timeout threshold, press = The output pose no longer expands forward; when If the update timeout threshold is exceeded, normal pose transmission is paused, and transmission resumes after a new snapshot is obtained. The update timeout threshold is greater than... In this embodiment, the time is 0.05 seconds.

[0106] After entering Q3 point cloud accumulation or Q4 relocation, the output thread clears the sendable snapshots and stops sending. Therefore, extrapolation on the order of 0.01 seconds is not used to cover the 1.5-second accumulation window and the subsequent relocation time. Long-term pure extrapolation during the recovery phase will not be published as reliable map positioning results.

[0107] (xi) Time anchor point and update order of a single running matching cycle

[0108] Single-frame laser from Start collecting, in End. The matching thread, after obtaining a complete scan, proceeds with... Query historical cache to obtain And compensate the laser points in that frame to At the reference time, a local coarse search and nonlinear fine matching are then performed. The matching thread... get And calculate the global correction transform. The deduction thread is in to The current pose is continuously updated based on wheel speed and angular velocity during the process.

[0109] Published via Atomic Mailbox. The next arrival time for gyroscope z-axis angular velocity data... At any given moment, the inference thread first completes the motion update for the current cycle, and then... Multiply by the current pose at that moment and all valid historical poses in the cache, then write the new historical node at that moment and publish the pose snapshot. The output thread in Read the snapshot, using the monotonic clock of the received moment as... Perform according to formula (9) for no more than Short-term extrapolation and sending.

[0110] The sequential relationship of each time anchor point within a complete matching cycle is as follows: .like Figure 5 As shown, The start time of the scan. This is the time when the scan ends and the reference pose is taken. To match the completion time and calculate the global correction transform, The timing for injecting the correction transformation into the next simulation cycle. This refers to the time when the output thread reads the snapshot and performs a timed extrapolation. The scan start and end times are the corresponding data times, while the matching completion, correction injection, and output times are the actual execution event times. Figure 5 The timeline is shown in two layers.

[0111] (xii) Methods for map creation, deployment and replacement

[0112] When deploying or changing the location map for the first time, the target indoor environment is first mapped using ROS2 Cartographer to obtain a PGM occupancy raster map and the corresponding YAML map configuration file. The map conversion program reads the map resolution from the PGM map and YAML file, converts the occupancy raster into a truncated non-negative Euclidean distance field, and saves it as a float32 type distance field binary file in row-major order.

[0113] Copy the generated distance field file to the map loading directory of the positioning program. At the same time, modify the map width, map height, map resolution, and the x and y coordinates of the map origin in the positioning program according to the actual parameters of the new map, so that they correspond to the map used when the distance field file was generated. Then restart the positioning program.

[0114] When the positioning program starts, it reads a corresponding number of float32 distance values ​​based on the set map width and height to form a two-dimensional distance field. During operation, it converts the global physical coordinates into distance field raster coordinates based on the map origin and resolution, and uses these coordinates for coarse search of laser points, bilinear interpolation, and nonlinear fine matching. As a preferred implementation, map switching is performed manually by simultaneously changing the distance field file and corresponding map parameters. Alternatively, map metadata can be written into the distance field file and automatically read by the positioning program at startup to reduce the risk of inconsistencies caused by manual parameter configuration.

[0115] like Figure 6 As shown, the map creation, deployment, and replacement process includes the following steps: Step S201: Create an environmental map using ROS2 Cartographer; Step S202: Obtain the PGM map and YAML configuration; Step S203: Generate a truncated non-negative Euclidean distance field; Step S204: Output a distance field file in float32 format; Step S205: Replace the distance field file in the localization program; Step S206: Simultaneously modify the map width, height, resolution, and origin parameters; and Step S207: Recompile and start the localization program.

[0116] (xiii) Test environment and verification methods

[0117] As a preferred implementation, this invention is carried out on an indoor wheeled mobile robot prototype. The prototype is equipped with a nominal 10 Hz two-dimensional LiDAR, a gyroscope, and a wheel encoder. The computing platform uses an embedded processor, and the encoder resolution is 1024 lines. The mapping process is completed offline using ROS2 Cartographer. The grid map is converted into a truncated non-negative range field file and then deployed with the localization program.

[0118] During the verification process, the continuity of pose output, the value distribution of various gating indicators, the stopping behavior of the output thread during the recovery phase, and the pose recovery status after repositioning can be observed under conditions such as normal tracking, artificial occlusion of the laser field of view, artificial movement of the robot, and artificial alteration of local environmental features. The above experimental environment is used to verify the continuity of each process and the consistency of state transitions, and is not used to limit specific indicators such as positioning accuracy, output frequency, response latency, and processing resource consumption.

[0119] In summary, before correcting and writing continuous poses, this invention jointly checks the number of valid points, number of interior points, distance or cost level, cost changes before and after optimization, and upper limit of correction amount. This makes it difficult for a single score with insufficient points, geometric degradation, or abnormal correction amount to enter continuous poses, thereby reducing the possibility of unreliable corrections propagating to later time windows through subsequent deductions.

[0120] During normal operation, the same global correction transformation applies simultaneously to the current pose being extrapolated during the matching period and all valid historical poses in the cache, ensuring that subsequent frames are in the same coordinate relationship when querying the end-of-scan pose, performing historical interpolation, and forming a matching reference. Since the global rigid body transformation does not change the relative geometric relationships between points within a frame, the current frame, which has already undergone temporal compensation and matching, does not need to be reprocessed. The direct beneficiaries of this correction are the coordinate consistency of subsequent frames and the availability of query results. Furthermore, the correction is limited to aligning the reference coordinate system with the matching result at the end of the scan as the anchor point; the motion increments extrapolated during the matching period are retained. Therefore, this correction differs from the method of directly assigning the current pose as the matching pose.

[0121] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for indoor mobile robot localization based on synchronous correction of the same transformation, characterized in that, include: The robot's current pose is updated according to the calculation cycle using only the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope, and the updated pose and its timestamp are written into a finite-length historical pose cache. For the current frame of laser scanning, the end time of the frame scanning is taken as the unified reference time. The reference pose is obtained from the historical pose cache and compensated to the unified reference time according to the relative motion corresponding to the time difference of each laser point relative to the unified reference time. On the pre-constructed range field, coarse search and fine matching are performed on the compensated laser points with the reference pose as a priori to obtain the matching pose corresponding to the unified reference time. The matching pose is gated based on multiple matching quality indicators. If the matching pose fails to pass, it will not be used to correct the current pose. When passing through quality gating, the coordinate transformation from the reference pose to the matched pose is determined as the global correction transformation; the simulation continues during the matching period, and in the simulation period after the matching is completed, the current pose of the simulation period and all historical poses recorded in the historical pose cache are multiplied by the same global correction transformation and written back. The current pose of the simulation period is the pose obtained by continuing the simulation from the unified reference time; after writing back, no compensation and matching are performed on the laser scan of the current frame.

2. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 1, characterized in that: When the number of consecutive failures of the quality gating reaches a set number, pose output is stopped, and multiple frames of laser point cloud are accumulated within a set time window. The accumulated point cloud is then repositioned in the distance field. The repositioned pose must be verified by the quality gating, where the translation correction and rotation correction are taken from the correction conditions corresponding to this repositioning. If the verification passes, the pose is used as the absolute pose to reset the current pose, the historical pose cache is cleared and rebuilt, and the laser scans accumulated during the repositioning are discarded. If the verification fails, the point cloud is re-accumulated or a positioning failure is reported. This absolute pose is used as the prior pose for coarse search in subsequent matching cycles.

3. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 1, characterized in that: The multiple matching quality indicators include: the number of valid points before and after fine matching is not less than a first set value, where valid points are laser points whose range is within the set range, whose distance field query is valid, and whose distance value is limited; the number of interior points after fine matching is not less than a second set value, where interior points are laser points among the valid points whose distance field distance value is less than the interior point threshold; the average value of the distance values ​​of the valid points after truncation is not greater than a third set value, and the average value after fine matching is not higher than the sum of the average value before fine matching and a fourth set value; the translation correction of the matched pose relative to the reference pose is not greater than a fifth set value, and its rotation correction is not greater than a sixth set value; if any of the above conditions are not met, the matched pose is not used to correct the current pose.

4. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 1, characterized in that: The distance field is a truncated non-negative Euclidean distance field, in which the distance value of the obstacle position is zero, and the distance value of the other positions is determined by the distance from the position to the nearest obstacle position and the map resolution, and the maximum truncated distance is taken when it exceeds the maximum truncated distance; in the coarse search and fine matching, the score of the coarse search, the residual of the fine matching, the analytical gradient of the residual relative to the pose component, and the distance in the quality gating are all determined based on the same distance field; the coarse search searches for candidate poses within a set range around the reference pose, and uses the candidate poses whose scores meet the set conditions as the initial values ​​for fine matching. When the scores do not meet the set conditions, the search range is expanded and candidate poses are regenerated.

5. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 1, characterized in that: The query to obtain the reference pose includes: when the end time of the scan is between the timestamps of two adjacent records in the historical pose cache, the poses of the two records are interpolated according to the timestamps of the two records; when the end time of the scan is later than the latest timestamp in the historical pose cache, the latest available pose is taken as the reference pose; the historical pose cache is a circular cache, and when it is full, the new record overwrites the oldest record, and the write-back includes writing the current pose after left multiplication as a new record into the historical pose cache; the deduction includes: constructing a planar motion velocity vector with the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope, updating the pose through SE(2) exponential mapping, the second component of the velocity vector is always zero, which represents that the lateral velocity in the vehicle coordinate system is zero, and the heading angle increment is the product of the z-axis angular velocity and the time interval of the deduction period; the deduction does not use the acceleration integral output by the inertial measurement unit.

6. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 2, characterized in that: The relocation includes: downsampling the accumulated point cloud to obtain sampling points, and when a prior pose exists, searching for candidate poses by scoring them in the range field around the prior pose. If the prior heading is valid, the search is performed within a first heading range; if the prior heading is invalid, the search is performed within a second heading range greater than the first heading range. If the best score obtained from the search exceeds a switching threshold or no prior pose exists, the search range is expanded to the complete physical boundary of the map corresponding to the range field and the complete heading range. The candidate pose must enable more than a set proportion of sampling points to complete a valid range field query. A valid prior heading means that the heading corresponding to the most recent positioning result that passed the quality gating before failure is available. If the initial heading is unknown or no available positioning result exists after power-on, the prior heading is invalid.

7. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 2, characterized in that: The accumulation of multi-frame laser point clouds includes: extracting laser points from each frame of laser scanning according to a set extraction ratio, with the number of accumulated laser points not exceeding a set upper limit, and using the difference between the end time of the current frame of laser scanning and the start time of the first frame of laser scanning being greater than a set duration as the accumulation end condition; before starting accumulation, requesting a stop command from the robot's upper-level scheduling system, or confirming that the robot is in a stationary state based on the linear velocity of the wheel encoder and the z-axis angular velocity of the gyroscope, or accumulating the laser points of each frame of laser scanning after transforming the derived pose to the same reference frame.

8. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 4, characterized in that: The fine matching uses the bilinear interpolation value of the distance field as the residual, and the sum of squares of each residual after being weighted by a robust kernel function is used as the optimization objective. The analytical gradient is calculated by combining the interpolation gradient and the Jacobian of the two-dimensional pose transformation, and the number of iterations does not exceed a set upper limit. If the pose obtained by fine matching fails the quality gate, but the initial value passes the check with the same inlier count condition, average cost condition, and correction amount condition as the quality gate, the initial value is used as the matched pose.

9. The indoor mobile robot positioning method based on synchronous correction of the same transformation according to claim 2, characterized in that: Also includes: Each time the extrapolation thread processes inertial measurement data and absorbs possible global correction transformations, it sends the latest pose snapshot along with the linear and angular velocities at that moment to the output thread, which is independent of the pose matching thread. Starting from the moment the pose snapshot is received, the output thread calculates and outputs the pose based on the linear and angular velocities within 0.01 seconds. After 0.01 seconds, the output pose is no longer extended forward. Extrapolation output is stopped during the accumulation of multiple frames of laser point cloud and during repositioning. The sending period of the pose snapshot is no more than 0.01 seconds.

10. An indoor mobile robot positioning device based on synchronous correction of the same transformation, characterized in that, It includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Global self-positioning method and device for mobile robot

    CN109144056A

  • Multi-sensor fusion laser radar positioning method, system and terminal

    CN113503876A

  • Method and system for detecting 2D laser positioning loss and storage medium

    CN116840820A

  • Laser scanning matching positioning method and system suitable for in-station complex environment

    CN120084300A