Loop closure detection methods, equipment and storage media

By constructing and registering historical local maps in a mobile robot, the accuracy problem of loop closure detection is solved, improving the accuracy of loop closure detection and map consistency.

CN119741347BActive Publication Date: 2025-10-31ZHEJIANG HUARAY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411680217.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-10-31
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

Existing loop closure detection algorithms are prone to failing to detect loops or making false detections in mobile robots, which affects their performance.

Method used

By obtaining the set of historical data frames corresponding to the current data frame, selecting candidate data frames with adjacent absolute poses, and combining the candidate data frames and supplementary data frames to construct a historical local map, performing registration, and determining whether loop closure occurs.

Benefits of technology

It improves the accuracy of loop closure detection, reduces false positives and false negatives, and enhances the consistency of the mobile robot's environmental map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741347B_ABST
    Figure CN119741347B_ABST
Patent Text Reader

Abstract

This application discloses a loop closure detection method, device, and storage medium. The loop closure detection method includes: selecting historical data frames from a historical data frame set whose absolute pose is adjacent to that of the current data frame to obtain candidate data frames; if the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a high difference threshold range, then selecting historical data frames from the historical data frame set whose acquisition time is adjacent to that of the candidate data frame and whose range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a low difference threshold range to obtain supplementary data frames; constructing a historical local map by combining the candidate data frames and the supplementary data frames; registering the current data frame with the historical local map; and determining whether a loop closure occurs based on the registration result. This method can increase the number of historical data frames with more similar features to the current data frame, thereby improving the accuracy of loop closure detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of environmental map construction technology, and in particular to a loop closure detection method, device and storage medium. Background Technology

[0002] Currently, mobile robots with autonomous navigation capabilities have been widely used in manufacturing plants, warehousing and logistics, restaurants and supermarkets. Mobile robots need environmental maps to locate themselves and plan their paths in order to perform tasks autonomously. Therefore, a map that can accurately describe the environment is a prerequisite for the stable operation of mobile robots.

[0003] Simultaneous Localization and Mapping (SLAM) is a feasible and efficient method for building maps in unknown scenarios. This technology relies on sensors onboard to the robot, such as LiDAR, image sensors, wheel speed and odometers, and inertial measurement units (IMUs), to measure environmental and motion data. By fusing sensor data through filtering or optimization, it achieves self-localization and constructs an environmental map. SLAM pose estimation is a recursive process, therefore the entire system accumulates significant errors over time and distance. Loop closure detection algorithms can determine if the robot has returned to previously visited locations, establishing constraints between the current and historical states, optimizing the overall motion pose, and improving map consistency through accurate loop closure detection.

[0004] However, current loop closure detection algorithms still have problems such as failing to detect loops or making false detections, which affects the operation of mobile robots. Summary of the Invention

[0005] To address the aforementioned technical problems, this application provides at least one loop closure detection method, device, and storage medium.

[0006] The first aspect of this application provides a loop closure detection method, which includes: taking the environmental sensing data frame currently collected by the environmental sensing device as the current data frame, obtaining the historical data frames corresponding to the current data frame, and obtaining a set of historical data frames; wherein, the historical data frame refers to the environmental sensing data frame collected by the environmental sensing device at a historical time, the historical time is earlier than the current time, and the time interval between the historical time and the current time is greater than a preset time interval; obtaining the absolute poses corresponding to the current data frame and the historical data frames respectively, selecting historical data frames whose absolute poses are adjacent to the absolute poses corresponding to the current data frame from the set of historical data frames, and obtaining candidate data frames; if the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a high difference threshold range, then selecting historical data frames whose collection time is adjacent to the collection time of the candidate data frame and whose range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a low difference threshold range from the set of historical data frames, and obtaining supplementary data frames; wherein, the maximum value of the low difference threshold range is less than the minimum value of the high difference threshold range; constructing a historical local map by combining the candidate data frames and the supplementary data frames, registering the current data frame with the historical local map, and determining whether a loop closure occurs based on the registration result.

[0007] In one embodiment, if the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a high difference threshold range, then before selecting historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame and whose range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a low difference threshold range, the method further includes: acquiring the yaw angle when the mobile device acquires the candidate data frame and the current data frame respectively; based on the yaw angle difference between the candidate data frame and the current data frame, detecting whether the device orientation when the mobile device acquires the candidate data frame and the device orientation when acquiring the current data frame are opposite; if they are opposite, it is determined that the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a high difference threshold range.

[0008] In one embodiment, if the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range, then a supplementary data frame is obtained by selecting historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame and whose range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the low difference threshold range. This includes: selecting historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame to obtain an initial data frame; obtaining the yaw angle when the mobile device acquires the initial data frame; based on the yaw angle difference between the initial data frame and the current data frame, detecting whether the device orientation when the mobile device acquires the initial data frame and the device orientation when acquiring the current data frame are opposite; if they are opposite, then it is determined that the range difference between the sensing range of the initial data frame and the sensing range of the current data frame is in the low difference threshold range, and the initial data frame is used as a supplementary data frame.

[0009] In one embodiment, the current data frame is registered with a historical local map, and the determination of whether a loop closure occurs is based on the registration result. This includes: registering the current data frame with a historical local map to obtain the probability that the current data frame belongs to a loop closure frame; if the probability that the current data frame belongs to a loop closure frame is greater than or equal to a preset probability threshold, then loop closure verification is performed; if the loop closure verification passes, then it is determined that a loop closure has occurred.

[0010] In one embodiment, the environmental sensing device includes a lidar, and the environmental sensing data frame includes a point cloud data frame. The process of registering the current data frame with a historical local map to obtain the probability that the current data frame belongs to a loopback frame includes: registering the current data frame with the historical local map using a nearest-point iteration algorithm, calculating the distance between each point in the registered current data frame and the nearest point in the historical local map, and obtaining the root mean square error (RMSE); and obtaining the probability that the current data frame belongs to a loopback frame based on the RMSE, wherein the RMSE is proportional to the probability.

[0011] In one embodiment, if the probability that the current data frame is a loopback frame is greater than a preset probability threshold, loopback verification is performed, including: calculating the ground height corresponding to the current data frame based on the ground data contained in the current data frame to obtain the ground height of the current frame; and calculating the ground height corresponding to the historical local map based on the ground data contained in the historical local map to obtain the ground height of the local map; calculating the ground height difference between the ground height of the current frame and the ground height of the local map; if the ground height difference is in the low difference threshold range, the loopback verification is determined to be passed; if the ground height difference is in the high difference threshold range, the loopback verification is determined to be failed; wherein, the maximum value of the low difference threshold range is less than the high difference threshold range. The minimum value of the difference threshold interval; and / or, acquiring subsequent data frames; where subsequent data frames refer to environmental sensing data frames collected by the environmental sensing device at a later time, which is later than the current time; registering the subsequent data frames with the historical local map to obtain the probability that the subsequent data frames belong to loopback frames, and taking the subsequent data frames whose probability of belonging to loopback frames is greater than a preset probability threshold as verified successful data frames; if the total number of verified successful data frames is in the high number threshold interval, it is judged that the loopback verification is passed, and if the total number of verified successful data frames is in the low number threshold interval, it is judged that the loopback verification is not passed; where the maximum value of the low number threshold interval is less than the minimum value of the high number threshold interval.

[0012] In one embodiment, the method further includes: identifying whether the mobile device is in an environment-similar region based on the current data frame; wherein, an environment-similar region refers to a region whose spatial information is similar to the spatial information of at least one other region; if the mobile device is in an environment-similar region, then stop loop closure detection; if the mobile device is not in an environment-similar region, then start loop closure detection.

[0013] In one embodiment, the environmental similarity region includes a narrow channel region, the environmental sensing device includes a lidar, and the environmental sensing data frame includes a point cloud data frame; identifying whether the mobile device is in an environmental similarity region based on the current data frame includes: reducing the current data frame to a two-dimensional point cloud; performing line fitting on the two-dimensional point cloud, and sorting the fitted lines in descending order of length; if the lengths of the first preset number of lines are all greater than or equal to a preset length threshold, then it is determined that the mobile device is in a narrow channel region.

[0014] A second aspect of this application provides a loop closure detection device, comprising: a data frame acquisition module, configured to use an environmental sensing data frame currently acquired by an environmental sensing device as the current data frame, acquire historical data frames corresponding to the current data frame, and obtain a set of historical data frames; wherein, a historical data frame refers to an environmental sensing data frame acquired by the environmental sensing device at a historical time, the historical time being earlier than the current time, and the time interval between the historical time and the current time being greater than a preset time interval; and a candidate frame selection module, configured to acquire the absolute poses corresponding to the current data frame and the historical frames respectively, and select historical data frames from the set of historical data frames whose absolute poses are adjacent to the absolute poses corresponding to the current data frame. The system obtains candidate data frames; the supplementary frame selection module is used to select historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame and whose range difference between the sensing range of the candidate data frame and the current data frame is in the low difference threshold range if the range difference between the sensing range of the candidate data frame and the current data frame is in the high difference threshold range, thus obtaining supplementary data frames; wherein, the maximum value of the low difference threshold range is less than the minimum value of the high difference threshold range; the loop closure registration module is used to construct a historical local map by combining the candidate data frame and the supplementary data frame, register the current data frame with the historical local map, and determine whether a loop closure occurs based on the registration result.

[0015] A third aspect of this application provides an electronic device, including a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement the above-described loop closure detection method.

[0016] The fourth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the above-described loop closure detection method.

[0017] The above scheme obtains a set of historical data frames by using the environmental sensing data frame currently acquired by the environmental sensing device as the current data frame and acquiring the corresponding historical data frames. It then acquires the absolute poses of both the current and historical data frames, selecting candidate data frames from the historical data frame set whose absolute poses are adjacent to those of the current data frame. If the difference between the sensing range of a candidate data frame and the sensing range of the current data frame is within a high difference threshold range, supplementary data frames are selected from the historical data frame set whose acquisition time is adjacent to that of the candidate data frame and whose sensing range is within a low difference threshold range. Finally, a historical local map is constructed by combining the candidate and supplementary data frames. The current data frame is then registered with the historical local map, and the registration result is used to determine whether a loop closure occurs. This approach increases the number of historical data frames with more similar features to the current data frame, improving the accuracy of loop closure detection.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0020] Figure 1 This is a schematic diagram of the implementation environment of a solution provided in one embodiment of this application;

[0021] Figure 2 This is a flowchart illustrating a loop closure detection method in an exemplary embodiment of this application;

[0022] Figure 3 This is a schematic diagram illustrating a narrow channel region in an exemplary embodiment of this application;

[0023] Figure 4 This is a schematic diagram illustrating the selection of supplementary data frames, as shown in an exemplary embodiment of this application;

[0024] Figure 5 This is a block diagram illustrating a loop closure detection device in an exemplary embodiment of this application;

[0025] Figure 6 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this application;

[0026] Figure 7 This is a schematic diagram illustrating the structure of a computer-readable storage medium, as shown in an exemplary embodiment of this application. Detailed Implementation

[0027] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0028] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0029] In this document, the term "and / or" is merely a description of the association information of related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0030] The loop closure detection method provided in the embodiments of this application will be described below.

[0031] Please refer to Figure 1 The diagram illustrates an implementation environment provided in one embodiment of this application. This implementation environment may include a mobile device 110 and a server 120, which are interconnected.

[0032] The mobile device 110 can be an automated guided vehicle, a freight robot, a sweeping robot, a drone, an unmanned vehicle, etc., and this application does not limit the type of mobile device 110. The mobile device 110 performs localization and map building in the current operating environment.

[0033] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0034] For example, the mobile device 110 collects environmental perception data frames through a deployed environmental perception device, and performs self-localization and environmental map construction based on the collected environmental perception data frames.

[0035] For example, the mobile device 110 may send the collected environmental perception data frames to the server 120, and the server 120 may locate the mobile device 110 and construct an environmental map based on the environmental perception data frames.

[0036] The multi-device path scheduling method provided in this application embodiment can be executed by a mobile device 110, a server 120, or by the interaction and cooperation of the mobile device 110 and the server 120. That is, some steps of the method are executed by the mobile device 110 and other steps are executed by the server 120.

[0037] Please see Figure 2 , Figure 2 This is a flowchart illustrating a loop closure detection method in an exemplary embodiment of this application. This loop closure detection method can be applied to... Figure 1 The implementation environment shown is specifically executed by a mobile device within that implementation environment. It should be understood that this method can also be applied to other exemplary implementation environments and executed by devices in other implementation environments; this embodiment does not limit the implementation environment to which the method is applicable.

[0038] like Figure 2 As shown, the loop closure detection method includes at least steps S210 to S240, which are described in detail below:

[0039] Step S210: Take the environmental sensing data frame currently collected by the environmental sensing device as the current data frame, obtain the historical data frame corresponding to the current data frame, and obtain the historical data frame set.

[0040] Among them, historical data frames refer to environmental sensing data frames collected by the environmental sensing device at historical times. The historical time is earlier than the current time, and the time interval between the historical time and the current time is greater than the preset time interval.

[0041] Among them, the environmental sensing device includes, but is not limited to, lidar and / or image acquisition equipment, and the environmental sensing data frame includes point cloud data frame and / or image frame, etc., and the spatial information of the environment in which the mobile device is located is obtained through the environmental sensing device.

[0042] The mobile device moves in the operating environment and activates the environmental sensing device to periodically collect environmental sensing data frames, and stores the collected environmental sensing data frames.

[0043] When performing loop closure detection, the environmental sensing data frame collected by the environmental sensing device at the current time is taken as the current data frame, and the historical data frame corresponding to the current data frame is obtained to obtain a set of historical data frames. The obtained historical data frames are environmental sensing data frames collected before the current time, and the time between the collection time of the historical data frame and the current time is greater than a preset time interval. The historical data frame set and the current data frame are registered to detect whether a loop closure occurs.

[0044] For example, environment-aware data frames can be recorded in memory, and then, by sharing pointers corresponding to these data frames, the frames can be retrieved when loopback detection is needed. Retrieving data via shared pointers avoids the increase in runtime memory caused by the internal maintenance of loopback detection data.

[0045] For example, the stored data related to the environment-aware data frame includes, but is not limited to, the index of the environment-aware data frame Ind∈{Ind0,Ind1,…,Ind}. N The acquisition time t of the environment-aware data frame and / or the absolute pose T corresponding to the environment-aware data frame. w The specific data content of the environmental awareness data frame.

[0046] Taking an environmental sensing device, including lidar, as an example, the environmental sensing data frame is a point cloud data frame, and its surface feature point cloud can be represented as P. s ={p s1 ,p s2 ,…,p sn′ The line feature point cloud can be represented as P. c ={p c1 ,p c2 ,…,p cn′}, then the feature point cloud can be represented as P f =P s +P c ={p s1 ,…,p sn′ ,p c1 ,…,p cn′ If the original laser point cloud is recorded as P o For point cloud data frame P w ={p w1 ,p w2 ,…,p wn Any point p in} wk =(x k ,y k ,z k ) T It can be obtained from Formula 1:

[0047]

[0048] Where, p fk For point p wk The corresponding feature point cloud, p ok For point p wk The corresponding original laser point cloud.

[0049] Based on Formula 1 above, the absolute pose T can be obtained. w .

[0050] Step S220: Obtain the absolute poses corresponding to the current data frame and the historical data frames respectively, and select the historical data frames whose absolute poses are adjacent to the absolute poses corresponding to the current data frame from the historical data frame set to obtain candidate data frames.

[0051] Obtain the absolute pose corresponding to the current data frame and the absolute pose corresponding to the historical data frames. The absolute pose refers to the pose representation in the same coordinate system. For example, the same coordinate system can be the map coordinate system or the world coordinate system of the operating environment.

[0052] Select historical data frames whose absolute pose is adjacent to that of the current data frame from the historical data frame set to obtain candidate data frames.

[0053] In some implementations, the distance between the absolute pose of the current data frame and the absolute pose of each historical data frame is calculated, and the data frames are sorted in descending order according to the distance. The top N historical data frames are then selected as candidate data frames. Alternatively, historical data frames with a distance less than or equal to a preset distance threshold are selected as candidate data frames.

[0054] In some implementations, a k-dimensional tree (kd-tree) can be used to store the environmental sensing data frames periodically collected by the environmental sensing device. Each environmental sensing data frame is a node in the kd-tree. Based on the absolute pose of the current data frame, a nearest neighbor search is performed in the kd-tree to obtain the N historical data frames closest to the current data frame. These are then used as candidate data frames. The distance between the obtained historical data frames and the current data frame is less than a preset distance threshold, and the time interval between the acquisition time of the historical data frame and the current time is greater than a preset time interval.

[0055] Using a kd-tree to select candidate data frames eliminates the need to traverse all frames and requires no additional feature detection or descriptor extraction, thus improving algorithm efficiency.

[0056] It should be noted that the number of candidate data frames can be one or more. For example, when there are multiple historical data frames selected, the historical data frame with the earliest acquisition time can be used as the final candidate data frame. This application does not limit this.

[0057] Step S230: If the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range, then select from the historical data frame set a historical data frame whose acquisition time is close to that of the candidate data frame and whose range difference between the sensing range and the sensing range of the current data frame is in the low difference threshold range, and obtain a supplementary data frame.

[0058] Among them, the maximum value of the low difference threshold interval is smaller than the minimum value of the high difference threshold interval.

[0059] The sensing range includes, but is not limited to, the angular range and / or spatial range that the environmental sensing device can sense. The angular range refers to the set of angles from which the environmental sensing device can collect spatial information, and the spatial range refers to the set of areas in the operating environment from which the environmental sensing device can collect spatial information. This application does not limit the specific manifestation of the sensing range.

[0060] Therefore, the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame includes, but is not limited to, angular range difference and / or spatial range difference. If the range difference is in the high difference threshold range, it indicates that the range difference is large. Supplementary data frames are obtained by selecting historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame and whose range difference between the sensing range and the sensing range of the current data frame is in the low difference threshold range.

[0061] If the time interval between the acquisition time of a historical data frame and the acquisition time of a candidate data frame is less than a preset time interval threshold, it is determined that the acquisition time of the historical data frame is close to the acquisition time of the candidate data frame.

[0062] Because environmental sensing devices are limited by deployment angle, occlusion by the mobile device itself, or occlusion by other obstacles, they cannot obtain full-angle environmental spatial information in a single frame of data collected. As a result, although the absolute poses of the selected candidate data frames and the current data frame are close, the degree of overlap in the sensing range is not high, and there are not many similar features between the candidate data frames and the current data frames. This ultimately reduces the accuracy of subsequent registration and affects the accuracy of loop closure detection.

[0063] Based on this, when the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range, historical data frames whose acquisition time is close to that of the candidate data frame and whose range difference between the sensing range and the sensing range of the current data frame is in the low difference threshold range are selected from the historical data frame set to obtain supplementary data frames. This can increase the number of historical data frames with more similar features to the current data frame and improve the accuracy of loop closure detection.

[0064] Step S240: Construct a historical local map by combining candidate data frames and supplementary data frames, register the current data frame with the historical local map, and determine whether a loop closure occurs based on the registration result.

[0065] Maps are constructed based on the spatial information of the environment contained in candidate data frames and supplementary data frames to obtain historical local maps. The spatial information of the environment contained in the current data frame is matched with the spatial information of the historical local maps to determine whether the spatial location corresponding to the current data frame is the same as the spatial location corresponding to the historical local map. That is, it is to detect whether the mobile device has passed through the current spatial location before. If the spatial location corresponding to the current data frame is the same as the spatial location corresponding to the historical local map, a loop is determined to have occurred.

[0066] Next, some embodiments of this application will be described in detail.

[0067] In some implementations, the method further includes: identifying whether the mobile device is in an environment-similar region based on the current data frame; wherein, an environment-similar region refers to a region whose spatial information is similar to the spatial information of at least one other region; if the mobile device is in an environment-similar region, then stop loop closure detection; if the mobile device is not in an environment-similar region, then start loop closure detection.

[0068] In some operating environments, there may be multiple areas with highly similar spatial information, which may lead to misidentification of loopback detection by mobile devices.

[0069] For example, similar passageways, similar furniture and appliances, similar shelving, etc.

[0070] Therefore, before performing loop closure detection, it is determined whether the mobile device is in a similar environment area. If it is in a similar environment area, the loop closure detection is stopped in order to improve the accuracy of loop closure detection. If it is not in a similar environment area, the loop closure detection is started again, that is, steps S210 to S240 are executed.

[0071] Among them, the environmental similarity area can be preset based on experience, such as setting the environmental similarity area as the narrow channel area; it can also analyze the number of environmental distinguishing features contained in the current environmental perception data frame. If the number of environmental distinguishing features is less than the preset number threshold, it is judged that the current environment is difficult to distinguish from other environments, and the mobile device is in the environmental similarity area. Among them, environmental distinguishing features refer to the features corresponding to other spatial information besides common spatial information such as building ground, walls, and shelves, such as targets, decorations, base stations, etc.

[0072] For example, the similar environment region includes a narrow channel region, the environmental sensing device includes a lidar, and the environmental sensing data frame includes a point cloud data frame; based on the current data frame, identifying whether the mobile device is in a similar environment region includes: reducing the current data frame to a two-dimensional point cloud; performing line fitting on the two-dimensional point cloud, and sorting the fitted lines in descending order of length; if the lengths of the first preset number of lines in the sorting are all greater than or equal to a preset length threshold, then it is determined that the mobile device is in a narrow channel region.

[0073] Narrow aisle areas include, but are not limited to, narrow passageways such as shelves and machine aisles. These types of areas are characterized by close proximity between aisles and similar spatial structure features. Loop closure detection algorithms can easily identify different narrow aisle areas as the same narrow aisle area, leading to the generation of incorrect loop edge constraints.

[0074] For example, please see Figure 3 , Figure 3 A schematic diagram of a narrow channel region shown in an exemplary embodiment of this application, as follows: Figure 3 As shown, the spatial structure information of multiple narrow channel regions is similar. After the mobile device is detected to have entered the narrow channel region, the loop closure detection is paused.

[0075] Specifically, the environmental point cloud (i.e., the current data frame) obtained from the scan is sorted according to the azimuth angle from the point to the center of the lidar, and downsampled to obtain a lightweight two-dimensional point cloud. Starting from any point in the two-dimensional point cloud, m consecutive points are selected for line fitting to obtain the line y = kx + b. For example, the least squares method is used for line fitting, and the following variables are defined:

[0076]

[0077] In Formula 2, the two-dimensional coordinates of the i-th point selected in the two-dimensional point cloud are represented as (x... i ,y i ).

[0078] Based on the variables in Formula 2, k and b in the linear equation can be obtained from the following Formula 3:

[0079]

[0080] Then, using the seed growth method, traverse subsequent points and add points whose distance to the fitted line is less than a preset distance threshold to the point set belonging to the line. Continue traversing forward until the traversed point is no longer on the line. Record the current point of forward traversal as the endpoint of the line, obtain the line length through the endpoint of the line, and record the line.

[0081] Repeat the above steps until all points in the two-dimensional point cloud have been traversed, resulting in a set of straight lines. Sort the straight lines in the set in descending order of length. If the lengths of the first preset number of straight lines are all greater than or equal to a preset length threshold, it is determined that the mobile device is in a narrow channel area.

[0082] For example, selecting the two longest lines from the set of lines, if both lines are longer than a preset length threshold and the angle difference between them is less than a preset angle threshold, then it indicates entry into a narrow channel region. Figure 3 As shown, loop closure detection is not performed at this time.

[0083] The calculation steps for the difference in the sensing range between the candidate data frame and the current data frame are illustrated with an example:

[0084] In some implementations, the data acquisition area corresponding to the environmental perception data frame in the operating environment can be used as the perception range. The cross-intersection over union (CUI) ratio between the data acquisition area corresponding to the candidate data frame and the data acquisition area corresponding to the current data frame can be calculated. The range difference is obtained based on the CUI ratio. The larger the CUI ratio, the smaller the range difference; the smaller the CUI ratio, the larger the range difference.

[0085] In some implementations, the acquisition angle of the mobile device when acquiring environmental perception data frames can be used as the perception range. The angle difference between the acquisition angle corresponding to the candidate data frame and the acquisition angle corresponding to the current data frame can be calculated, and the range difference can be obtained based on the angle difference.

[0086] For example, the yaw angles of the mobile device when acquiring candidate data frames and the current data frame are obtained respectively; based on the difference in yaw angles between the candidate data frame and the current data frame, it is detected whether the device orientation when acquiring the candidate data frame and the device orientation when acquiring the current data frame are opposite; if they are opposite, it is determined that the difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range.

[0087] For example, please see Figure 4 , Figure 4 A schematic diagram illustrating the yaw angle of a data frame, as shown in an exemplary embodiment of this application, is provided. Figure 4 As shown, the candidate data frame is data frame Ind40 collected by the mobile device at a historical time. The yaw angle of the mobile device when collecting data frame Ind40 is represented as yaw. his The yaw angle of the mobile device when acquiring the current data frame is represented as yaw. cur ,like in If the set angle threshold is not met, it is determined that the device orientation when the mobile device is collecting candidate data frames is opposite to the device orientation when collecting the current data frame. Figure 4 As shown, it is determined that the difference between the sensing range of the candidate data frame and the sensing range of the current data frame is within the high difference threshold range; otherwise, it is determined that the device orientation when the mobile device collects the candidate data frame is not opposite to the device orientation when collecting the current data frame.

[0088] If the difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range, in order to increase the number of historical data frames with more similar features to the current data frame, supplementary data frames are obtained by selecting historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame and whose sensing range is in the low difference threshold range.

[0089] For example, taking the yaw angle as an example, the step of selecting the supplementary data frame in step S230 may include:

[0090] Step S231: Select historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame to obtain the initial data frame.

[0091] If the time interval between the acquisition time of the historical data frame and the acquisition time of the candidate data frame is less than the preset time interval, it is determined that the acquisition time of the historical data frame is close to the acquisition time of the candidate data frame, and the historical data frame is used as the initial data frame.

[0092] The preset time interval for selecting the initial data frame can be pre-set or flexibly calculated. For example, the preset time interval can be flexibly calculated based on the acquisition frequency of the environmental perception data frame and / or the difference between the perception range of the candidate data frame and the perception range of the current data frame. The lower the acquisition frequency and / or the greater the difference in range, the larger the preset time interval, and vice versa. This application does not limit this.

[0093] Step S232: Obtain the yaw angle when the mobile device collects the initial data frame.

[0094] Step S233: Based on the yaw angle difference between the initial data frame and the current data frame, detect whether the device orientation when the mobile device collects the initial data frame is the same as the device orientation when collecting the current data frame.

[0095] By combining the yaw angle difference between the initial data frame and the current data frame, the acquisition position of the initial data frame and the acquisition position of the current data frame, it can be determined whether the device orientation when the mobile device acquires the initial data frame is the same as the device orientation when acquiring the current data frame.

[0096] For example, continue as Figure 4As shown, the initial data frames include data frames Ind37, Ind36, Ind35, Ind34, and Ind44 collected by the mobile device in historical time. Based on the yaw angle difference between each initial data frame and the current data frame, and the acquisition positions of the initial data frames and the current data frame, the device orientation corresponding to data frames Ind37, Ind36, and Ind35 is in the same direction as the device orientation corresponding to the current data frame, while the device orientation corresponding to data frames Ind34 and Ind44 is opposite to the device orientation corresponding to the current data frame.

[0097] Among them, by Figure 4 It can be seen that the yaw angle difference judgment rule for initial data frames within the coverage area of ​​the device orientation corresponding to the current data frame is different from that for initial data frames not within the coverage area of ​​the device orientation corresponding to the current data frame. For initial data frames within the coverage area of ​​the device orientation corresponding to the current data frame, if the absolute value of the difference between the yaw angle difference and 180° is less than a preset angle threshold, it is judged as a phase. For initial data frames not within the coverage area of ​​the device orientation corresponding to the current data frame, if the absolute value of the yaw angle difference is less than a preset angle threshold, it is judged as a phase.

[0098] Step S233: If the two frames are in the same direction, it is determined that the difference between the sensing range of the initial data frame and the sensing range of the current data frame is in the low difference threshold range, and the initial data frame is used as a supplementary data frame.

[0099] Initial data frames whose range difference between the sensing range and the sensing range of the current data frame is within a low difference threshold range are used as supplementary data frames.

[0100] Optionally, in addition to using the initial data frame as a supplementary data frame, all environmental perception data frames acquired between the supplementary data frames are also used as supplementary data frames to obtain continuous environmental perception data frames in terms of acquisition time for local map construction, thereby improving the completeness of the constructed historical local map.

[0101] For example, such as Figure 4 As shown, each environmental perception data frame is assigned an index sequentially according to the acquisition time, such as Ind37, Ind36, Ind35, etc. If the minimum data index of the supplementary data frame opposite to the current data frame is Ind35 and the maximum index is Ind43, then all historical data frames between Ind35 and Ind43 are used as data frames for constructing a local map, thus obtaining a historical local map.

[0102] Of course, in addition to the above embodiments, the yaw angle of the mobile device when collecting the current data frame can also be directly obtained to obtain the device orientation when collecting the current data frame. Historical data frames covered by the device orientation at the time of collecting the current data frame, and historical data frames whose collection time is close to that of the candidate data frame, can then be used as supplementary data frames. Figure 4 In the process, historical data frames Ind35 to Ind39, which are covered by the device orientation at the time of the current data frame and are close to the acquisition time of the candidate data frame, are directly used as supplementary data frames.

[0103] In some implementations, when constructing a historical local map based on candidate data frames, in order to ensure the integrity of the historical local map, the K frames whose acquisition time is closest to the acquisition time of the candidate data frames can be directly used as supplementary data frames, such as K being 3.

[0104] After obtaining candidate data frames and supplementary data frames, a historical local map is constructed, such as by stitching together the candidate data frames and supplementary data frames, and voxel filtering is performed on the stitching result to obtain the final historical local map.

[0105] In some implementations, step S240 involves registering the current data frame with historical local maps and determining whether a loopback occurs based on the registration result, including:

[0106] Step S241: Register the current data frame with the historical local map to obtain the probability that the current data frame belongs to a loopback frame;

[0107] Step S242: Compare the probability that the current data frame belongs to a loopback frame with the preset probability threshold. If the probability that the current data frame belongs to a loopback frame is greater than or equal to the preset probability threshold, then proceed to step S243. If the probability that the current data frame belongs to a loopback frame is less than the preset probability threshold, then proceed to step S244.

[0108] Step S243: Perform loop closure verification. If the loop closure verification passes, it is determined that a loop has occurred.

[0109] Step S244: Obtain subsequent data frames and continue executing steps S210 and S240.

[0110] For example, the environmental sensing device includes a lidar, and the environmental sensing data frame includes a point cloud data frame; registering the current data frame with a historical local map to obtain the probability that the current data frame belongs to a loop closure frame includes: registering the current data frame with the historical local map using a nearest point iteration algorithm, calculating the distance between each point in the registered current data frame and the nearest point in the historical local map, and obtaining the root mean square error; obtaining the probability that the current data frame belongs to a loop closure frame based on the root mean square error, wherein the root mean square error is proportional to the probability.

[0111] The current data frame and historical local maps are matched using the Generalized-Iterative Closest Point (GICP) method. The root mean square error of each point in the current data frame to the nearest point in the historical local map after registration is calculated as an indicator of the matching quality. Specifically, for the current data frame P... k any point in the middle p i In the historical partial map P local The nearest point q i Then the current data frame P k Root mean square error (RMSE) k It can be obtained from the following formula 4:

[0112]

[0113] Where n is the total number of current data frame points.

[0114] When the root mean square error satisfies RMSE k <ε thres , ε thres If a preset error threshold is set, then the possibility of a loop closure is recorded, and loop closure verification is performed.

[0115] It should be noted that other algorithms can also be used to calculate the loop closure probability, such as loop closure detection based on the bag-of-words model or loop closure detection based on the random fern method. The specific algorithm for calculating the loop closure probability can be flexibly selected according to the type of environmental perception data frame and the actual application scenario. This application does not limit this.

[0116] Examples of feasible implementations for loop closure verification are provided below:

[0117] Example 1: Calculate the ground height corresponding to the current data frame based on the ground data contained in the current data frame to obtain the ground height of the current frame; and calculate the ground height corresponding to the historical local map based on the ground data contained in the historical local map to obtain the ground height of the local map; calculate the ground height difference between the ground height of the current frame and the ground height of the local map. If the ground height difference is within the low difference threshold range, the loop closure verification is considered successful; if the ground height difference is within the high difference threshold range, the loop closure verification is considered unsuccessful. The maximum value in the low difference threshold range is less than the minimum value in the high difference threshold range.

[0118] For example, taking lidar as an example, for the current data frame P k Compared with historical partial map P localGround point cloud extraction is performed, which can refer to methods in Lightweight and Ground-Optimized Lidar Odometry and Mapping on Variable Terrain (LeGO-LOAM) or methods based on plane fitting. Based on the extracted ground point cloud, the ground height corresponding to the current data frame and the ground height corresponding to historical local maps are obtained.

[0119] The difference in the z-axis direction of the data frames at the location of the loop should be similar to the difference in ground height Δh at that location. Specifically, if the difference in ground height between the current frame and the local map ground height is Δz... k For |Δz k -Δh|>h thres The loop closure test results, h thres If the preset difference threshold is used, the loop closure verification is considered to have failed; otherwise, the loop closure verification is considered to have succeeded.

[0120] Example 2: Acquire subsequent data frames; where subsequent data frames refer to environmental sensing data frames collected by the environmental sensing device at a later time than the current time; register the subsequent data frames with the historical local map to obtain the probability that the subsequent data frames belong to loopback frames, and take the subsequent data frames whose probability of belonging to loopback frames is greater than a preset probability threshold as verified successful data frames; if the total number of verified successful data frames is in the high number threshold range, it is judged that the loopback verification is passed, and if the total number of verified successful data frames is in the low number threshold range, it is judged that the loopback verification is failed; where the maximum value of the low number threshold range is less than the minimum value of the high number threshold range.

[0121] The same algorithm is used to register subsequent data frames with historical local maps to obtain the probability that a subsequent data frame belongs to a loopback frame. If the probability that multiple consecutive subsequent data frames belong to a loopback frame is greater than a preset probability threshold, the loopback verification is considered to have passed; otherwise, the loopback verification is considered to have failed.

[0122] Optionally, to improve computational efficiency, the relative pose relationship ΔT between the current data frame and the historical local map is calculated after successful registration. k , with ΔT k As an initial value, it accelerates the interaction between subsequent data frames and historical local maps P. local GICP matching, calculate RMSE k+1 When RMSE is satisfied k+1 <ε thres When the probability that the (k+1)th frame is a loopback frame is greater than the preset probability threshold, the verification is successful, and ΔT is recorded. k+1Then, repeat the above steps for frame k+2.

[0123] The number of subsequent data frames that need to be verified for loopback is related to the distance and angle at which the environmental perception data frames are collected. The higher the storage density of the environmental perception data frames (i.e., the higher the collection frequency), the more subsequent data frames need to be verified for loopback.

[0124] If the total number of successfully verified data frames is in the high-threshold range, the loopback verification is considered successful; if the total number of successfully verified data frames is in the low-threshold range, the loopback verification is considered unsuccessful.

[0125] Alternatively, the loopback verification can be considered successful if all subsequent data frames that require loopback verification are successfully verified.

[0126] Example 3 can also be based on the relative pose relationship ΔT between the current data frame and the historical local map. k Perform a loopback verification.

[0127] Calculate ΔT k The relative distance change Δt k =(Δx) k Δy k Δz k ) T Δx k Δy k Δz k These represent the relative distance changes along the x, y, and z axes, respectively. Given that the change in the odometer reading at the front end is not significant, the relative distance change should not be too large; that is, it should satisfy |Δt|. k |<Δd thres At this point, the loop closure verification is considered successful, where the relative distance threshold Δd is used. thres The parameter settings and laser odometry drift are related to the cumulative distance from the last loop.

[0128] Of course, loopback verification can also be performed by combining the above embodiments, and this application does not limit this.

[0129] In some implementations, if a loop occurs, loop pose correction is required. Specific steps include:

[0130] The data frame with the smallest root mean square error (RMSE) in the loop closure probability calculation and loop closure verification is selected as the data frame to be corrected, and the index of the data frame to be corrected is denoted as Ind. n The absolute pose is denoted as T. wn GICP is used to calculate P relative to the historical local map. local The pose is ΔT. Then the data frame Ind... n Corrected absolute pose T′wn It can be calculated using the following formula 5:

[0131] T′ wn =ΔT·T wn (Formula 5)

[0132] Further, global pose graph optimization is performed, including the following steps:

[0133] Construct a pose graph model where nodes represent the absolute poses of all environment-aware data frames, and edges between nodes represent recursively derived relative pose constraints or loop closure constraints. The index of a candidate data frame containing a loop is denoted as Ind. g The index of the current data frame where a loop is detected is Ind. k In the fixed pose graph, the indices will be Ind0 to Ind0. g With Ind k ~Ind max The nodes. For data frame i and data frame j, their absolute poses are T and T, respectively. wi and T wj The relative pose recorded by the constraint edges between the two frames is T. ij Then the optimization residuals of i and j can be expressed as Expressed in Lie algebra as follows:

[0134] Formula 6:

[0135]

[0136] The objective function for overall optimization is expressed as Equation 7 below:

[0137]

[0138] in, Let E be the information matrix of edges i and j, and let E be the number of nodes (Ind0~Indj). max The set of all edges in the equation is used to minimize the value of the overall optimization objective function.

[0139] Among them, the residual is calculated with respect to the small perturbation δξ of the variable to be optimized. i With δξ j The partial derivative is expressed as follows:

[0140] Formula 8:

[0141]

[0142] After obtaining the partial derivatives, the absolute poses of each environment-aware data frame can be obtained by solving the Gauss-Newton or LM (Levenberg-Marquardt) algorithm.

[0143] In addition, considering that new data frames may be created during the loopback process, it is necessary to propagate the corrected pose backward to update the absolute pose of subsequent environmental perception data frames.

[0144] Of course, other algorithms can also be used for loop closure pose correction and global pose graph optimization, and this application does not limit them.

[0145] The loop closure detection method provided in this application takes the environmental sensing data frame currently acquired by the environmental sensing device as the current data frame, obtains the historical data frames corresponding to the current data frame, and obtains a historical data frame set; obtains the absolute poses corresponding to the current data frame and the historical data frames respectively, selects historical data frames whose absolute poses are close to the absolute poses corresponding to the current data frame from the historical data frame set, and obtains candidate data frames; if the range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range, then selects historical data frames whose acquisition time is close to the acquisition time of the candidate data frame and whose range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the low difference threshold range from the historical data frame set, and obtains supplementary data frames; constructs a historical local map by combining the candidate data frames and the supplementary data frames, registers the current data frame with the historical local map, and determines whether a loop closure occurs based on the registration result. This method can increase the number of historical data frames with more similar features to the current data frame, thereby improving the accuracy of loop closure detection.

[0146] Figure 5 This is a block diagram illustrating a loop closure detection device according to an exemplary embodiment of this application. Figure 5 As shown, the exemplary loop closure detection device 500 includes:

[0147] The data frame acquisition module 510 is used to take the environmental sensing data frame currently collected by the environmental sensing device as the current data frame, acquire the historical data frame corresponding to the current data frame, and obtain a set of historical data frames; wherein, the historical data frame refers to the environmental sensing data frame collected by the environmental sensing device in a historical time, the historical time is earlier than the current time, and the time interval between the historical time and the current time is greater than a preset time interval.

[0148] The candidate frame selection module 520 is used to obtain the absolute poses corresponding to the current data frame and the historical data frames respectively, and select the historical data frames whose absolute poses are adjacent to the absolute poses corresponding to the current data frame from the historical data frame set to obtain candidate data frames.

[0149] The supplementary frame selection module 530 is used to select, from the historical data frame set, historical data frames whose acquisition time is close to that of the candidate data frame and whose range difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range, and obtain supplementary data frames; wherein, the maximum value of the low difference threshold range is less than the minimum value of the high difference threshold range.

[0150] The loop closure registration module 540 is used to construct a historical local map by combining candidate data frames and supplementary data frames, register the current data frame with the historical local map, and determine whether a loop closure occurs based on the registration result.

[0151] It should be noted that the loop closure detection device and the loop closure detection method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the loop closure detection device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0152] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device 600 includes a memory 601 and a processor 602. The processor 602 is used to execute program instructions stored in the memory 601 to implement the steps in any of the above-described loop closure detection method embodiments. In a specific implementation scenario, the electronic device 600 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 600 may also include mobile devices such as laptops and tablets, which are not limited here.

[0153] Specifically, processor 602 controls itself and memory 601 to implement the steps in any of the above-described loop closure detection method embodiments. Processor 602 can also be referred to as a Central Processing Unit (CPU). Processor 602 may be an integrated circuit chip with signal processing capabilities. Processor 602 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 602 can be implemented using integrated circuit chips.

[0154] Please see Figure 7 , Figure 7 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 700 stores program instructions 710 that can be executed by a processor. The program instructions 710 are used to implement the steps in any of the above-described loop closure detection method embodiments.

[0155] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0156] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0157] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0158] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A loop closure detection method, characterized in that, The mobile device is equipped with an environmental sensing device, which is used to acquire spatial information about the environment in which the mobile device is located. The method includes: The environmental sensing data frame currently collected by the environmental sensing device is taken as the current data frame, and the historical data frame corresponding to the current data frame is obtained to obtain a set of historical data frames; wherein, the historical data frame refers to the environmental sensing data frame collected by the environmental sensing device at a historical time, the historical time is earlier than the current time, and the time interval between the historical time and the current time is greater than a preset time interval. The absolute poses corresponding to the current data frame and the historical data frame are obtained respectively. From the set of historical data frames, historical data frames whose absolute poses are adjacent to the absolute poses corresponding to the current data frame are selected to obtain candidate data frames. If the difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in the high difference threshold range, then a supplementary data frame is obtained by selecting from the historical data frame set that has a collection time close to that of the candidate data frame and a sensing range difference between that of the candidate data frame and the current data frame that is in the low difference threshold range; wherein, the maximum value of the low difference threshold range is less than the minimum value of the high difference threshold range. A historical local map is constructed by combining the candidate data frames and the supplementary data frames. The current data frame is then registered with the historical local map, and a loopback is determined based on the registration result.

2. The method according to claim 1, characterized in that, Before selecting historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame and whose range difference between their sensing range and the current data frame is in the low difference threshold range if the difference between their sensing range and the current data frame is in the high difference threshold range, the method further includes: The yaw angles of the mobile device when it collects the candidate data frame and the current data frame are obtained respectively. Based on the yaw angle difference between the candidate data frame and the current data frame, it is detected whether the device orientation when the mobile device collects the candidate data frame and the device orientation when collecting the current data frame are opposite. If they are opposite, it is determined that the difference between the perception range of the candidate data frame and the perception range of the current data frame is in the high difference threshold range.

3. The method according to claim 2, characterized in that, If the difference between the sensing range of the candidate data frame and the sensing range of the current data frame is in a high difference threshold range, then supplementary data frames are obtained by selecting historical data frames from the historical data frame set whose acquisition time is close to that of the candidate data frame and whose sensing range is in a low difference threshold range compared to the sensing range of the current data frame. These supplementary data frames include: Select historical data frames whose acquisition time is close to that of the candidate data frames from the set of historical data frames to obtain the initial data frames; Obtain the yaw angle of the mobile device when it collects the initial data frame; Based on the yaw angle difference between the initial data frame and the current data frame, it is detected whether the device orientation when the mobile device collects the initial data frame and the device orientation when collecting the current data frame are opposite; If the two frames are in the same direction, it is determined that the difference between the sensing range of the initial data frame and the sensing range of the current data frame is within a low difference threshold range, and the initial data frame is used as a supplementary data frame.

4. The method according to claim 1, characterized in that, The step of registering the current data frame with the historical local map and determining whether a loopback occurs based on the registration result includes: The current data frame is registered with the historical local map to obtain the probability that the current data frame belongs to a loopback frame; If the probability that the current data frame belongs to a loopback frame is greater than or equal to a preset probability threshold, then loopback verification is performed. If the loop closure verification passes, it is determined that a loop closure has occurred.

5. The method according to claim 4, characterized in that, The environmental sensing device includes a lidar, and the environmental sensing data frame includes a point cloud data frame; the step of registering the current data frame with the historical local map to obtain the probability that the current data frame belongs to a loopback frame includes: The nearest point iteration algorithm is used to register the current data frame with the historical local map, and the distance between each point in the current data frame and the nearest point in the historical local map is calculated to obtain the root mean square error. The probability that the current data frame belongs to a loopback frame is obtained based on the root mean square error, wherein the root mean square error is proportional to the probability.

6. The method according to claim 4, characterized in that, If the probability that the current data frame belongs to a loopback frame is greater than or equal to a preset probability threshold, then loopback verification is performed, including: The ground height corresponding to the current data frame is calculated based on the ground data contained in the current data frame to obtain the ground height of the current frame; and the ground height corresponding to the historical local map is calculated based on the ground data contained in the historical local map to obtain the ground height of the local map. Calculate the ground height difference between the current frame ground height and the local map ground height. If the ground height difference is within the low difference threshold range, the loop closure verification is considered successful. If the ground height difference is within the high difference threshold range, the loop closure verification is considered unsuccessful. The maximum value of the low difference threshold range is less than the minimum value of the high difference threshold range. And / or, acquire subsequent data frames; wherein, the subsequent data frames refer to environmental sensing data frames collected by the environmental sensing device at a later time, the later time being later than the current time; The subsequent data frames are registered with the historical local map to obtain the probability that the subsequent data frames belong to loopback frames. Subsequent data frames with a probability of belonging to loopback frames greater than a preset probability threshold are used as verified successful data frames. If the total number of successfully verified data frames is in the high number threshold range, the loopback verification is considered to have passed; if the total number of successfully verified data frames is in the low number threshold range, the loopback verification is considered to have failed. The maximum value of the low number threshold range is less than the minimum value of the high number threshold range.

7. The method according to claim 1, characterized in that, The method further includes: Based on the current data frame, it is identified whether the mobile device is in an environment-similar region; wherein, the environment-similar region refers to a region whose spatial information is similar to that of at least one other region; If the mobile device is in a similar area of ​​the environment, loopback detection is stopped; if the mobile device is not in a similar area of ​​the environment, loopback detection is started.

8. The method according to claim 7, characterized in that, The environmental similarity region includes a narrow channel region, the environmental sensing device includes a lidar, and the environmental sensing data frame includes a point cloud data frame; identifying whether the mobile device is in an environmental similarity region based on the current data frame includes: Reduce the current data frame to a two-dimensional point cloud; The two-dimensional point cloud is fitted with straight lines, and the fitted lines are sorted in descending order of length. If the lengths of the first preset number of lines are all greater than or equal to a preset length threshold, then the mobile device is determined to be in a narrow channel region.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the steps of the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that can be executed by a processor to implement the steps of the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Loopback detection method and device, electronic equipment and computer readable medium

    CN114241044A

  • Loopback detection method, computer equipment, computer readable storage medium and vehicle

    CN115601434A