Method and device for predicting a return path, non-transitory storage medium, processor
By detecting the movement trajectory of the scanning device during real-time positioning and mapping, predicting loop paths and generating prompts, the problem of inaccurate positioning and mapping caused by the lack of loop path prediction is solved, achieving more accurate positioning and mapping results.
Patent Information
- Application Number
- CN202211007262.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2042-08-22
AI Technical Summary
The lack of loop path prediction and loop reminder functions during real-time positioning and mapping results in inaccurate positioning and mapping.
By detecting whether the scanning trajectory of the scanning device has not passed the starting position a second time within a preset time period, the loopback path is predicted and a prompt message is generated to prompt the user to complete the loopback detection.
It achieves more accurate real-time positioning and map building results, reduces error accumulation, and improves the accuracy of positioning and map building.
Smart Images

Figure CN115420275B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of loop closure detection technology, and more specifically, to a method and apparatus for predicting loop closure paths, a non-volatile storage medium, and a processor. Background Technology
[0002] In real-time localization and mapping (JRT), the pose constraints of the current frame are calculated based on the previous frame. Due to errors in the calculated pose, these errors accumulate during mapping, causing map drift. Therefore, loop closure detection is needed to determine if the scanner revisits the same location during mapping. If it does, loop closure correction is performed to reduce mapping deviation. However, users in practical applications do not intentionally perform loop closure scans. If loop closure scans cannot be completed, the results of JRT and map construction will be inaccurate.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a method and apparatus for predicting loop paths, a non-volatile storage medium, and a processor to at least solve the technical problem of inaccurate real-time positioning and map construction results caused by the lack of loop path prediction and loop reminder functions.
[0005] According to one aspect of the embodiments of this application, a method for predicting a loop path is provided, comprising: during the process of real-time positioning and map construction, detecting whether the scanning movement trajectory of the scanning device has not passed the starting position on the scanning path for the second time within a preset time period; and predicting the loop path when it is detected that the scanning movement trajectory of the scanning device has not passed the starting position for the second time within the preset time period.
[0006] Optionally, if the scanning movement trajectory of the scanning device does not pass the starting position a second time within a preset time period, a prompt message is generated.
[0007] Optionally, predicting loop closure paths includes: predicting a first loop closure path and / or a second loop closure path, wherein the first loop closure path is a global loop closure path and the second loop closure path is a local loop closure path.
[0008] Optionally, predicting the first loop path includes: obtaining the first position of the scanning device corresponding to the current frame, and using the first position as the first endpoint of the first loop path, wherein the current frame is the frame corresponding to when the scanning device generates prompt information during the scanning process; obtaining the starting position, and using the starting position as the second endpoint of the first loop path; and generating the first loop path based on the first endpoint and the second endpoint of the first loop path.
[0009] Optionally, predicting the second loop path includes: using the first position as the first endpoint of the second loop path; obtaining a second position whose distance from the first position is the target distance, and using the second position as the second endpoint of the second loop path; and generating the second loop path based on the first endpoint and the second endpoint of the second loop path.
[0010] Optionally, the second position is not on the target path, wherein the target path is the path through which the scanning device passes the target position at least once, and the target position is any position other than the starting position and any position at a distance equal to the target distance from the starting position.
[0011] Optionally, during the real-time positioning and map building process, if a local loop path is detected, all frames within the detected local loop path are marked as loop frames; when the scanning device finishes scanning, if frames other than loop frames are detected, a prompt message is generated.
[0012] Optionally, after predicting the loop closure path, the above method further includes: displaying the loop closure path; and / or controlling the scanning device to move according to the loop closure path.
[0013] According to another aspect of the embodiments of this application, a loop path prediction device is also provided, comprising: a detection module, used to detect whether the scanning movement trajectory of the scanning device has not passed the starting position on the scanning path for the second time within a preset time period during the process of real-time positioning and map building; and a prediction module, used to predict the loop path when it is detected that the scanning movement trajectory of the scanning device has not passed the starting position for the second time within the preset time period.
[0014] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the above-mentioned loopback path prediction method.
[0015] According to another aspect of the embodiments of this application, a processor is also provided, which is used to run a program stored in a memory, wherein the program executes the above-described loop path prediction method during runtime.
[0016] In this embodiment, during the real-time positioning and map building process, the scanning device's movement trajectory is detected to have not passed the starting position on the scanning path a second time within a preset time period. If the scanning device's movement trajectory is detected to have not passed the starting position a second time within the preset time period, a loopback path is predicted. By predicting the loopback path and generating prompt information, the user is prompted to complete the loopback detection, thereby achieving the technical effect of obtaining more accurate real-time positioning and map building results. This solves the technical problem of inaccurate real-time positioning and map building results caused by the lack of loopback path prediction and loopback reminder functions. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a flowchart of a loop path prediction method according to an embodiment of this application;
[0019] Figure 2 This is a schematic diagram illustrating the difference between having and not having loop closure optimization according to an embodiment of this application;
[0020] Figure 3 This is a structural diagram of a global loop and a local loop according to an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of a global loop path and a local loop path according to an embodiment of this application;
[0022] Figure 5 This is a structural diagram of a loop path prediction device according to an embodiment of this application. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] According to an embodiment of this application, an embodiment of a method for displaying a loop path is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0026] Figure 1 This is a flowchart of a loopback path prediction method according to an embodiment of this application. The method includes the following steps:
[0027] Step S102: During the real-time positioning and map building process, it is detected whether the scanning movement trajectory of the scanning device has not passed the starting position on the scanning path a second time within a preset time period.
[0028] According to an optional embodiment of this application, simultaneous localization and mapping (SLAM) is a concept: a robot and / or scanner, starting from an unknown location in an unknown environment, locates its position and orientation by repeatedly observing map features (e.g., corners, pillars) during movement, and then incrementally builds a map based on its own position, thereby achieving simultaneous localization and mapping. Detecting whether the scanning device revisits the starting position on the scanning path is the loop closure detection process in SLAM. Loop closure detection determines whether the robot and / or scanner has returned to a previously traversed position. If a loop closure is detected, it transmits the information to the backend for optimization. In visual simultaneous localization and mapping, pose estimation is often a recursive process, i.e., the pose of the current frame is calculated from the pose of the previous frame. Therefore, the error is propagated frame by frame, which is what we call accumulated error. An effective way to eliminate error is to perform loop closure detection. A loop closure is a more compact and accurate constraint than the backend, and this constraint can form a topologically consistent trajectory map. If closed loops can be detected and optimized, the results can be made more accurate.
[0029] Loop closure detection includes, but is not limited to, the following methods:
[0030] 1. Loop Closure Detection via Images: A popular loop closure detection method in existing simultaneous localization and mapping (SLAM) systems is the feature point-bag-of-words approach (e.g., ORB-SLAM, VINS-Mono). The bag-of-words approach pre-loads a bag-of-words dictionary (DJ), instructing this DJ to convert the descriptor of each local feature point in the image into a word. The dictionary contains all words, and a bag-of-words vector is generated for all words in the image. The distance between these vectors represents the difference between two images. During image retrieval, an inverted index is used to first find keyframes with the same words as the current frame. The similarity between these keyframes and the current frame is calculated based on their bag-of-words vectors. Frames with insufficient similarity are discarded, and the remaining keyframes are selected as candidate keyframes and sorted from closest to furthest by the distance between their bag-of-words vectors. Visual feature descriptors are highly correlated with environmental appearance. Appearance is greatly affected by lighting and changes over time; therefore, visual feature maps often have a short lifespan.
[0031] 2. Laser Synchronous Localization and Mapping (laser SLAM), with loop closure detection for point clouds: First, ScanContext / LiDAR Iris is used to detect loop closure frames. After identifying loop closure frames in historical frames, the loop closure frames are registered with the current point cloud frame to obtain the precise pose of the loop closure. The essence of loop closure detection is to perform similarity detection between the current point cloud and historical point clouds. If a corresponding point cloud in the historical data has a high similarity, this historical frame is identified as a loop closure frame. Registration is then performed between the current point cloud and the historical frame to obtain the precise pose. Due to the existence of cumulative error, the pose obtained by laser odometry over consecutive iterations will have a certain deviation from that of a historical moment, while loop closure detection does not have cumulative error.
[0032] 3. Use GPS to assist in loop closure detection: Based on the information provided by GPS, determine the distance between the current position and the position of the previous frame i. If the distance is less than the set threshold, perform a similarity test between the current frame and the i-th frame. If the similarity is greater than a certain threshold, the i-th frame is identified as a loop closure frame.
[0033] As another optional embodiment of this application, the scanner is a handheld scanner. During real-time localization and map building using the handheld scanner, loop closure detection is also necessary, and the loop closure path should be predicted and relevant prompts generated when no loop closure is detected. When a user scans a large scene (such as an underground parking lot, road, stairwell, room, an entire building, or a residential area, etc., on the order of hundreds of meters) using the handheld scanner, the scanner generates a large number of frames during the scanning process. Based on these numerous frames, a 3D model of the large scene can be reconstructed. During real-time localization and map building using the handheld scanner, the user can add a GPS device to the handheld scanner, or utilize a GPS system installed in the user's mobile phone or vehicle to transmit signals with the handheld scanner. The user can move within the large scene by walking or by vehicle.
[0034] The handheld scanner may include a camera, inertial navigation system, global positioning system and a series of sensor components, which can be calibrated before the handheld scanner is used.
[0035] Step S104: If the scanning movement trajectory of the scanning device does not pass the starting position a second time within a preset time period, predict the loop path.
[0036] According to another optional embodiment of this application, during real-time localization and map construction, if the area is large, loop closure detection can significantly improve the reconstruction quality. Therefore, when a user scans with a LiDAR scanner, if the working time exceeds a preset time and a loop closure is not detected, it is necessary to predict the loop closure path. If the scanning device does not pass the starting position a second time within the preset time, i.e., if the scanning device does not complete the loop closure within the preset time, the loop closure path will be predicted.
[0037] Based on the above steps, by predicting the loop closure path and generating prompt information, the goal of prompting the user to complete the loop closure detection is achieved, thereby realizing the technical effect of obtaining more accurate real-time positioning and map construction results. This solves the technical problem of inaccurate real-time positioning and map construction results caused by the lack of loop closure path prediction and loop closure reminder functions.
[0038] In some optional embodiments of this application, a prompt message is generated when it is detected that the scanning movement trajectory of the scanning device has not passed the starting position a second time within a preset time period.
[0039] As another optional embodiment of this application, if no loop closure is detected after the scanning time exceeds a preset duration, the user will be prompted that loop closures need to be formed for higher reconstruction accuracy. If a local loop closure is found, all frames within the loop will be marked as loop closure frames. If the user finds frames that have not formed loop closures when the scan is finally ended, the user will be prompted that some areas have not formed loop closures and whether to end the scan.
[0040] According to an optional embodiment of this application, predicting a loop closure path includes the following steps: predicting a first loop closure path and / or a second loop closure path, wherein the first loop closure path is a global loop closure path and the second loop closure path is a local loop closure path.
[0041] According to another optional embodiment of this application, a global loop is a loop formed when the scanner passes the starting position for the second time, while a local loop is a loop formed by the scanner but not when it passes the starting position for the second time. This application can predict and guide the user to complete a loop by following either a global loop path that can form a global loop or a local loop path that can form a local loop.
[0042] In some optional embodiments of this application, the prediction of the first loop path can be achieved by the following methods: obtaining the first position of the scanning device corresponding to the current frame and using the first position as the first endpoint of the first loop path, wherein the current frame is the frame corresponding to when the scanning device generates prompt information during the scanning process; obtaining the starting position and using the starting position as the second endpoint of the first loop path; generating the first loop path based on the first endpoint and the second endpoint of the first loop path.
[0043] As an optional embodiment of this application, the frame generated when the user receives the reminder message is the current frame, and the current frame is used as the starting point of the global loopback path; the frame where the user's starting position is located, that is, the earliest frame (the frame not marked as a loopback frame), is used as the ending point of the global loopback path. Based on the starting point and the ending point of the global loopback path, a feasible path is generated for the user to choose from.
[0044] In some optional embodiments of this application, the prediction of the second loop path is achieved by the following method: taking the first position as the first endpoint of the second loop path, obtaining the second position at a distance of the target distance from the first position, and taking the second position as the second endpoint of the second loop path; generating the second loop path based on the first endpoint and the second endpoint of the second loop path.
[0045] As another optional embodiment of this application, the frame generated when the user receives the reminder message is the current frame, which is used as the starting point of the local loopback path. Based on the user's current location, a previous frame at a set distance from the current frame is obtained. The time difference between the previous frame and the current frame is also greater than a set threshold, and the previous frame is not marked as a loopback frame. This previous frame is used as the ending point of the local loopback path. Based on the starting point and ending point of the local loopback path, a feasible path is generated for the user to choose from.
[0046] According to an optional embodiment of this application, the second position is not on the target path, wherein the target path is the path through which the scanning device passes the target position at least once, and the target position is a position other than the starting position and the position at a distance of the target distance from the starting position.
[0047] As an optional embodiment of this application, the endpoint of the predicted local loopback path should be a location that is not the starting position or is near the starting position, and the endpoint of the predicted local loopback path should be a frame that has not formed a local loopback, that is, a frame that has not been marked as a loopback frame. Only when the above conditions are met will a feasible local loopback path be predicted for the user to choose from.
[0048] In some optional embodiments of this application, during the localization and map building process, if a local loop path is detected, all frames within the detected local loop path are marked as loop frames; when the scanning device finishes scanning, if frames other than loop frames are detected, a prompt message is generated.
[0049] As another optional embodiment of this application, during the real-time localization and map building process, if local loops are generated, all frames within the local loops will be marked as loop frames. If the user finds that there are still frames that have not formed loops when the scan is finally ended, that is, multiple local loops have been formed but global loops have not yet been generated, the user will be prompted: Some areas have not formed loops, do you want to end the scan? When the user wants more accurate real-time localization and map building results, the user can complete the loops according to the generated loop prediction path.
[0050] Figure 2 This is a schematic diagram illustrating the difference between having and not having loop closure optimization according to an embodiment of this application, as shown below. Figure 2 As shown, the significance of loop closure detection is that it relates to the accuracy of the estimated trajectory and map over a long period of time; it can improve the correlation between current data and all historical data, thus enabling relocation using loop closure detection.
[0051] Figure 3 This is a structural diagram of a global loop and a local loop according to an embodiment of this application, such as... Figure 3As shown, loop closures can be global or local. Local loop closures can optimize the pose of local frames, but cannot optimize frames where no loop closure has been formed. A global loop closure is formed when the scanner passes the starting position or a position near the starting position for the second time. A local loop closure is formed when the scanner passes the same position for the second time, but this same position is not the starting position or a position near the starting position.
[0052] Figure 4 This is a schematic diagram of a global loopback path and a local loopback path according to an embodiment of this application, as shown below. Figure 4 As shown, the predicted loop closure path is divided into a global loop closure path and a local loop closure path. Point b represents the starting position of the scanner, and the frame at the starting position can be called the earliest frame. Point a represents the position at a set distance from the current frame. The frame at point a is not marked as a loop closure frame, meaning that point a is not on the local loop closure path. The solid line represents the current path, and the dashed line represents the predicted loop closure path.
[0053] As an optional embodiment of this application, after performing step S104 to predict the loop closure path, the loop closure path can also be displayed; and / or the scanning device can be controlled to move according to the loop closure path.
[0054] In some optional embodiments of this application, the predicted feasible loop path is displayed on the display interface. Based on the predicted feasible loop path, the user can choose whether to perform the loop to obtain more accurate real-time positioning and map construction results.
[0055] As another optional embodiment of this application, the scanner can be mounted on an autonomous vehicle or drone and automatically move in large scenes (such as underground parking lots, roads, stairwells, rooms, an entire building, a residential area, etc., on the order of hundreds of meters). The previously determined loop path is transmitted to the autonomous vehicle or drone, which will automatically plan its own path based on the previously determined loop path, thereby enabling the scanning device to move along the loop path.
[0056] As another optional embodiment of this application, after performing step S104 to predict the loop closure path, the scanning device is controlled to move along the loop closure path while displaying the loop closure path.
[0057] In some optional embodiments of this application, after performing step S104 to predict the loop closure path, the scanner displays the loop closure path and sends a prompt message. After receiving a confirmation message from the user, the scanner is controlled to move according to the loop closure path.
[0058] Figure 5 This is a structural diagram of a loop path prediction device according to an embodiment of this application, as shown below. Figure 5As shown, the device includes:
[0059] The detection module 50 is used to detect whether the scanning movement trajectory of the scanning device has not passed the starting position on the scanning path a second time within a preset time period during the real-time positioning and map building process.
[0060] According to an optional embodiment of this application, simultaneous localization and mapping (SLAM) is a concept: a robot starts from an unknown location in an unknown environment, and during movement, locates its own position and orientation by repeatedly observing map features (e.g., corners, pillars, etc.), then incrementally builds a map based on its own position, thereby achieving simultaneous localization and mapping. Detecting whether the scanning device revisits the starting position on the scanning path is the loop closure detection process in SLAM. Loop closure detection determines whether the robot has returned to a previously visited position. If a loop is detected, it transmits the information to the backend for optimization. In visual simultaneous localization and mapping, pose estimation is often a recursive process, that is, the pose of the current frame is calculated from the pose of the previous frame. Therefore, the error is passed down frame by frame, which is what we call cumulative error. An effective way to eliminate error is to perform loop closure detection. A loop closure is a more compact and accurate constraint than the backend, and this constraint can form a topologically consistent trajectory map. If closed loops can be detected and optimized, the results can be made more accurate.
[0061] Loop closure detection includes, but is not limited to, the following methods:
[0062] 1. Loop Closure Detection via Images: A popular loop closure detection method in existing simultaneous localization and mapping (SMR) systems is the feature point-based bag-of-words (BOB) approach. The BOB-based method pre-loads a BOB dictionary and instructs it to convert the descriptor of each local feature point in the image into a word. The dictionary contains all words, and a BOB vector is generated by statistically analyzing the words in the entire image. The distance between these BOB vectors represents the difference between two images. During image retrieval, an inverted index is used to first find keyframes that share words with the current frame. The similarity between these keyframes and the current frame is calculated based on their BOB vectors. Frames with insufficient similarity are discarded, and the remaining keyframes are selected as candidate keyframes and sorted from closest to furthest by their BOB vector distance. Visual feature descriptors are highly correlated with environmental appearance. Appearance is greatly affected by lighting and changes over time; therefore, visual feature maps often have a short lifespan.
[0063] 2. Laser Synchronous Localization and Mapping (LSLM) with Loop Closure Detection for Point Clouds: First, Scan Context / LiDAR Iris is used to detect loop closure frames. After identifying loop closure frames in historical frames, the loop closure frames are registered with the current point cloud frame to obtain the precise pose of the loop closure. The essence of loop closure detection is to perform similarity detection between the current point cloud and historical point clouds. If a corresponding point cloud in the historical frame shows high similarity, this historical frame is identified as a loop closure frame. Registration is then performed between the current point cloud and the historical frame to obtain the precise pose. Due to accumulated errors, the pose obtained by continuous laser odometry deviates from the pose obtained at a given historical moment, while loop closure detection does not have accumulated errors.
[0064] 3. Use GPS to assist in loop closure detection: Based on the information provided by GPS, determine the distance between the current position and the position of the previous frame i. If the distance is less than the set threshold, perform a similarity test between the current frame and the i-th frame. If the similarity is greater than a certain threshold, the i-th frame is identified as a loop closure frame.
[0065] Prediction module 52 is used to predict the loop path when it is detected that the scanning movement trajectory of the scanning device has not passed the starting position a second time within a preset time period.
[0066] According to an optional embodiment of this application, simultaneous localization and mapping (SLAM) is a concept: a robot starts from an unknown location in an unknown environment, and during movement, locates its own position and orientation by repeatedly observing map features (e.g., corners, pillars, etc.), then incrementally builds a map based on its own position, thereby achieving simultaneous localization and mapping. Detecting whether the scanning device revisits the starting position on the scanning path is the loop closure detection process in SLAM. Loop closure detection determines whether the robot has returned to a previously visited position. If a loop is detected, it transmits the information to the backend for optimization. In visual simultaneous localization and mapping, pose estimation is often a recursive process, that is, the pose of the current frame is calculated from the pose of the previous frame. Therefore, the error is passed down frame by frame, which is what we call cumulative error. An effective way to eliminate error is to perform loop closure detection. A loop closure is a more compact and accurate constraint than the backend, and this constraint can form a topologically consistent trajectory map. If closed loops can be detected and optimized, the results can be made more accurate.
[0067] Loop closure detection includes, but is not limited to, the following methods:
[0068] 1. Loop Closure Detection via Images: A popular loop closure detection method in existing simultaneous localization and mapping (SMR) systems is the feature point-based bag-of-words (BOB) approach. The BOB-based method pre-loads a BOB dictionary and instructs it to convert the descriptor of each local feature point in the image into a word. The dictionary contains all words, and a BOB vector is generated by statistically analyzing the words in the entire image. The distance between these BOB vectors represents the difference between two images. During image retrieval, an inverted index is used to first find keyframes that share words with the current frame. The similarity between these keyframes and the current frame is calculated based on their BOB vectors. Frames with insufficient similarity are discarded, and the remaining keyframes are selected as candidate keyframes and sorted from closest to furthest by their BOB vector distance. Visual feature descriptors are highly correlated with environmental appearance. Appearance is greatly affected by lighting and changes over time; therefore, visual feature maps often have a short lifespan.
[0069] 2. Laser Synchronous Localization and Mapping (LSLM) with Loop Closure Detection for Point Clouds: First, Scan Context / LiDAR Iris is used to detect loop closure frames. After identifying loop closure frames in historical frames, the loop closure frames are registered with the current point cloud frame to obtain the precise pose of the loop closure. The essence of loop closure detection is to perform similarity detection between the current point cloud and historical point clouds. If a corresponding point cloud in the historical frame shows high similarity, this historical frame is identified as a loop closure frame. Registration is then performed between the current point cloud and the historical frame to obtain the precise pose. Due to accumulated errors, the pose obtained by continuous laser odometry deviates from the pose obtained at a given historical moment, while loop closure detection does not have accumulated errors.
[0070] 3. Use GPS to assist in loop closure detection: Based on the information provided by GPS, determine the distance between the current position and the position of the previous frame i. If the distance is less than the set threshold, perform a similarity test between the current frame and the i-th frame. If the similarity is greater than a certain threshold, the i-th frame is identified as a loop closure frame.
[0071] In some optional embodiments of this application, the predicted feasible loop path is displayed on the display interface. Based on the predicted feasible loop path, the user can choose whether to perform the loop to obtain more accurate real-time positioning and map construction results.
[0072] It should be noted that, Figure 5 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 1 The relevant descriptions of the embodiments shown will not be repeated here.
[0073] This application also provides a non-volatile storage medium, which includes a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the above-mentioned loopback path prediction method.
[0074] A non-volatile storage medium performs the following functions: during real-time localization and map building, it detects whether the scanning movement trajectory of the scanning device has not passed the starting position on the scanning path a second time within a preset time period; if it is detected that the scanning movement trajectory of the scanning device has not passed the starting position a second time within a preset time period, it predicts the loopback path.
[0075] This application also provides a processor for running a program stored in a memory, wherein the program executes the above-described loop path prediction method during runtime.
[0076] The processor is used to run programs that perform the following functions: during real-time localization and map building, detecting whether the scanning movement trajectory of the scanning device has not passed the starting position on the scanning path a second time within a preset time period; and predicting the loop path if the scanning movement trajectory of the scanning device has not passed the starting position a second time within a preset time period.
[0077] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0078] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0079] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0080] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0081] 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.
[0082] 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 related technologies, 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.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0083] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method of predicting a loopback path, the method comprising: The method comprises: during the process of performing the instant positioning and the map construction, detecting whether the scanning moving track of the scanning device does not pass the starting position on the scanning path for the second time within a preset time length; in the case that it is detected that the scanning moving track of the scanning device does not pass the starting position for the second time within the preset time length, predicting a loop-back path; wherein, after predicting the loop-back path, the scanning device is controlled to move according to the loop-back path, wherein the predicted loop-back path at least comprises a local loop-back path, and the local loop-back path is a loop-back formed by not passing the starting position for the second time; wherein, predicting the loop-back path comprises: predicting a first loop-back path and / or a second loop-back path, wherein the first loop-back path is a global loop-back path, and the second loop-back path is a local loop-back path; wherein, predicting the second loop-back path comprises: obtaining a first position of the scanning device corresponding to a current frame, and taking the first position as a first end point of the second loop-back path; obtaining a second position with a distance from the first position being a target distance, and taking the second position as a second end point of the second loop-back path; generating the second loop-back path according to the first end point and the second end point of the second loop-back path; wherein, during the process of performing the instant positioning and the map construction, if it is detected that the local loop-back path is generated, all frames in the detected local loop-back path are marked as loop-back frames, and the second position is a position where a frame not marked as the loop-back frame is located.
2. The method of claim 1, wherein, The method further comprises: in the case that it is detected that the scanning moving track of the scanning device does not pass the starting position for the second time within the preset time length, generating prompt information.
3. The method of claim 2, wherein, Predicting the first loop-back path comprises: taking the first position as a first end point of the first loop-back path, wherein the current frame is a frame corresponding to the scanning device in the scanning process when the prompt information is generated; obtaining the starting position, and taking the starting position as a second end point of the first loop-back path; generating the first loop-back path according to the first end point and the second end point of the first loop-back path.
4. The method of claim 2, wherein, The method further comprises: when the scanning device ends the scanning, if it is detected that there is a frame other than the loop-back frame, the prompt information is generated.
5. The method according to any one of claims 1 to 4, characterized in that, After predicting the loop-back path, the method further comprises: displaying the loop-back path.
6. A loop path prediction device characterized by comprising: The method comprises: a detection module, configured to detect, during the process of performing the instant positioning and the map construction, whether the scanning moving track of the scanning device does not pass the starting position on the scanning path for the second time within a preset time length; a prediction module, configured to predict a loop-back path in the case that it is detected that the scanning moving track of the scanning device does not pass the starting position for the second time within the preset time length; wherein, after predicting the loop-back path, the scanning device is controlled to move according to the loop-back path, wherein the predicted loop-back path at least comprises a local loop-back path, and the local loop-back path is a loop-back formed by not passing the starting position for the second time; wherein, predicting the loop-back path comprises: predicting a first loop-back path and / or a second loop-back path, wherein the first loop-back path is a global loop-back path, and the second loop-back path is a local loop-back path; wherein predicting the second loop-back path comprises: obtaining a first position of a scanning device corresponding to a current frame, and taking the first position as a first end point of the second loop-back path; obtaining a second position with a distance from the first position being a target distance, and taking the second position as a second end point of the second loop-back path; generating the second loop-back path according to the first end point and the second end point of the second loop-back path; wherein in a process of performing the simultaneous localization and mapping, if a local loop-back path is detected, all frames within the detected local loop-back path are marked as loop-back frames, and the second position is a position where a frame not marked as the loop-back frame is located.
7. A non-volatile storage medium, characterized by The non-volatile storage medium comprises a stored program, wherein when the program is running, the device in which the non-volatile storage medium is located is controlled to perform the loop-back path prediction method of any one of claims 1 to 5.
8. A processor, comprising: The processor is configured to run a program stored in the memory, wherein when the program is running, the loop-back path prediction method of any one of claims 1 to 5 is performed.
Citation Information
Patent Citations
Method and device for performing loop closure detection
CN112955901A
Map construction method and device, computer equipment and storage medium
CN114689062A