An overlay judgment method, a chip and a robot
By replicating maps, extracting feature points, finding similar regions, and verifying matching with the actual environment, the accuracy and speed issues of overlay map judgment in intelligent mobile robots are solved, ensuring the stability of robot navigation.
Patent Information
- Application Number
- CN202210084608.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-01-25
AI Technical Summary
In existing technologies, intelligent mobile robots are prone to map overlay during the mapping process, leading to navigation errors. There is a lack of effective, fast, and accurate methods for identifying map overlay.
By copying the current map, feature points are extracted, and a random sampling consistency algorithm is used to find similar regions on the map. The matching of similar regions with the actual environment is verified by projection relationship. The feature point matching ability is improved by combining Gaussian filtering and SURF detection algorithms. The overlay map is verified by robot navigation and relocalization.
It improves the speed and accuracy of image overlay judgment, ensures the stability of robot behavior, and reduces navigation errors caused by image overlay.
Smart Images

Figure CN116542895B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent mobile robots, specifically to a method for determining overlay images, a chip, and a robot. Background Technology
[0002] Intelligent mobile robots need to build maps during operation, which involves continuously fusing data from encoders, gyroscopes, laser heads, or cameras to generate a map. Due to sensor instability, sensor noise, or human interference, the map may become distorted. From the point of distortion, a region similar to the original map will grow onto the new map; this is generally called "map overlay." Figure 1 Once an error occurs, it will cause subsequent erratic behavior in the robot, such as continuously trying to navigate to a place that does not actually exist. Overlaying cannot be fundamentally avoided, so how to quickly and accurately determine whether overlaying has occurred is a problem that urgently needs to be solved. Summary of the Invention
[0003] To address the aforementioned problems, this invention provides a method, chip, and robot for determining map overlay issues, significantly improving the efficiency and accuracy of the robot in determining whether a map is disordered. The specific technical solution of this invention is as follows:
[0004] An overlay detection method is applied to a mobile robot. The method includes the following steps: Step S1, copy the current map to obtain a first map and a second map, and then extract feature points on the first map and the second map; Step S2, based on the feature points, find similar regions of the first map and the second map using a random sampling consensus algorithm; Step S3, verify whether the similar regions of the first map and the second map match the actual environment. If they do not match, it is determined that an overlay has occurred.
[0005] Furthermore, the method further includes: performing Gaussian filtering on the current map before performing step S1 to filter out low-frequency noise.
[0006] Furthermore, in step S1, the method for extracting feature points on the first map and the second map includes either the SURF detection algorithm or the SIFT detection algorithm.
[0007] Further, in step S2, the method for finding similar regions between the first map and the second map using the random sampling consistency algorithm specifically includes: step S21, randomly selecting two feature points on the first map and connecting them to obtain a first vector; step S22, randomly selecting two feature points on the second map and connecting them to obtain a second vector; wherein the feature points selected on the first map are different from those selected on the second map; step S23, calculating the projection relationship between the first vector and the second vector; step S24, based on the projection relationship, transforming the remaining feature points on the first map except for the two feature points connected to form the first vector to obtain the transformed coordinates corresponding to each feature point; step Step S25: Based on the transformation coordinates corresponding to each feature point, determine whether there are feature points on the second map within the tolerance range of the transformation coordinates. If there are, the transformation coordinates match the feature points on the second map within its tolerance range, and record the number of matching feature points. Step S26: Repeat steps S21 to S25 several times, compare the number of matching points, and select the maximum value. Step S27: Based on the feature points on the second map corresponding to the maximum number of matching points, and the feature points on the first map corresponding to the transformation coordinates that match the feature points on the second map before the transformation, the area enclosed by the former on the second map and the area enclosed by the latter on the first map are similar areas.
[0008] Further, in step S23, the method for finding the projection relationship between the first vector and the second vector specifically includes: step S231, subtracting the coordinates of the starting point of the first vector from the coordinates of the starting point of the second vector to obtain the translation relationship between the first vector and the second vector; step S232, calculating the inner product of the first vector and the second vector, and the product of the magnitude of the first vector and the magnitude of the second vector, and then dividing the inner product by the product to obtain the cosine value of the angle between the first vector and the second vector; step S233, calculating the angle between the first vector and the second vector based on the cosine value to obtain the rotation relationship between the first vector and the second vector; wherein, the projection relationship between the first vector and the second vector includes the translation relationship and the rotation relationship between the first vector and the second vector.
[0009] Further, in step S3, the method for verifying whether the similar regions of the first map and the second map match the actual environment specifically includes: Step S31, the robot navigates to the centroid of the similar region of the first map. If it cannot navigate to the centroid, the similar region of the first map does not match the actual environment. If it successfully navigates to the location, it proceeds to step S32; Step S32, the robot constructs a local map of the current location and then performs relocalization. If relocalization fails, the similar region of the first map does not match the actual environment. If relocalization is successful, it proceeds to step S33; Step S33, the robot navigates to the centroid of the similar region of the second map. If it cannot navigate to the centroid, the similar region of the second map does not match the actual environment. If it successfully navigates to the location, it proceeds to step S34; Step S34, the robot constructs a local map of the current location and then performs relocalization. If relocalization fails, the similar region of the second map does not match the actual environment. If relocalization is successful, it is determined that there is no overlay map.
[0010] Furthermore, the method for obtaining the centroid of the similar region specifically includes: reading the coordinates of the feature points that enclose the similar region, adding the abscissas and calculating the average value to obtain the abscissa of the centroid, adding the ordinates and calculating the average value to obtain the ordinate of the centroid, thus obtaining the position of the centroid of the similar region.
[0011] Furthermore, the method for determining whether the robot can navigate to the center of mass specifically includes: the robot searching for a path to move to the center of mass; if no path can be found, it indicates that it cannot navigate to the center of mass; if a path is found, but the number of collisions with obstacles during the movement exceeds a preset number, it indicates that it cannot navigate to the center of mass.
[0012] Furthermore, the method also includes: after determining in step S3 that an overlay map has occurred, the robot clears the current map and then rebuilds the map; or, the robot reads the historical map for relocation, and if the relocation is successful, the historical map is set as the current map, and if the relocation fails, the map is rebuilt.
[0013] A chip storing computer program code, which, when executed, implements the steps of the overlay image judgment method.
[0014] A robot equipped with the chip.
[0015] The beneficial effects of this invention are as follows: Compared with the prior art, the method described in this invention transforms feature points on the first map to the second map through the projection relationship between the first and second maps, finds similar regions in the first and second maps based on the matching results, and finally verifies the similar regions to determine whether there is an overlay. In the process of calculating the projection relationship, since the first and second maps only involve planar transformations and the scale remains unchanged, only four points are needed to calculate the projection relationship, resulting in less data and significantly faster computation. Furthermore, by iteratively finding the projection relationship with the most matches, the accuracy of identifying similar regions can be improved, thereby increasing the accuracy of identifying overlays. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating an embodiment of the overlay image determination method of the present invention.
[0017] Figure 2 This is a schematic diagram of a global map constructed by a robot according to an embodiment of the present invention.
[0018] Figure 3 This is a schematic diagram of a global map containing feature points according to an embodiment of the present invention.
[0019] Figure 4 This is a schematic diagram of similar regions on a global map according to an embodiment of the present invention. Detailed Implementation
[0020] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0021] It should be understood that, when used in this application, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this application, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0022] As used in this application, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0023] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance. References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0024] To quickly and accurately determine whether images are overlapping and to prevent erratic behavior by the mobile robot, such as... Figure 1 As shown in the figure, this embodiment of the invention provides an overlay image judgment method applied to a mobile robot, the method comprising the following steps:
[0025] Step S1: Copy the current map to obtain the first map and the second map, and then extract feature points from the first map and the second map;
[0026] Step S2: Based on the feature points, find similar regions between the first map and the second map using a random sampling consistency algorithm;
[0027] Step S3: Verify whether the similar areas of the first map and the second map match the actual environment. If they do not match, it is determined that an overlay map has occurred.
[0028] It should be noted that in existing technologies, the Random Sample Consensus (RANSAC) algorithm is used to match two different images, while in this embodiment of the invention, the goal is to find similar parts on a map. Therefore, the current map already constructed by the robot is copied to facilitate the application of RANSAC in this embodiment. The current map refers to the global map of the current environment, specifically the global map obtained when the robot is preparing to recharge after completing its task. If the map is corrupted at this time, and the robot does not check and correct it, it will undoubtedly affect the robot's next task, causing behavioral errors. The robot can be a sweeping robot, mopping robot, disinfection robot, service robot, or other autonomous mobile robot; for such robots, an accurate map is a prerequisite for their normal operation. (Refer to...) Figure 2 Assuming the image is a global map constructed by the robot, it is clear that the image has an overlay anomaly. In subsequent embodiments, this will be used as an example to explain the overlay judgment method of the present invention in detail.
[0029] In one embodiment, before performing step S1, the robot performs Gaussian filtering on the current map to filter out low-frequency noise. Preferably, a template of size = 3*3 is used for Gaussian filtering. Similar parts in the map are generally stable walls or relatively fixed obstacles. However, due to factors such as unstable sensor operation or sensor noise, the mapping of these areas results in inconsistent sensor data and some minor differences. Using low-frequency filters such as Gaussian filtering can remove these differences, allowing subsequent feature point finding to focus more on stable features, thus improving the subsequent feature point matching ability.
[0030] During step S1, the method for extracting feature points includes either the SURF (Speeded Up Robust Feature) detection algorithm or the SIFT (Scale-invariant Feature Transform) detection algorithm. The SURF detection algorithm is a scale-invariant feature detection algorithm, meaning it can detect consistent keypoints not only on objects photographed at any scale, but also that each detected feature point corresponds to a scale factor. Ideally, the ratio between the two calculated scale factors should equal the ratio of the image scale. The SURF detection algorithm is an improvement on the SIFT detection algorithm, increasing its execution efficiency. Preferably, in this embodiment of the invention, the SURF detection algorithm is used to extract features on the map, referring to... Figure 3This image is a global map containing SURF feature points (indicated by a + sign in the image). It should be noted that you can first extract the feature points from the map, and then copy the map to obtain a first map and a second map containing the feature points; alternatively, you can first copy the map to obtain a first map and a second map, and then extract the feature points from each map separately. The results obtained by both methods are the same.
[0031] In step S2, the random sample consensus algorithm estimates the parameters of the mathematical model iteratively from a set of observation datasets containing "outsiders." The basic idea of the random sample consensus algorithm is to achieve the goal by repeatedly selecting a random subset of the data. The selected subset is assumed to be insiders and verified using the following approach:
[0032] (1) Establish a model that fits the assumed in-place point, that is, all unknown parameters can be calculated from the assumed in-place point;
[0033] (2) Use the model obtained in (1) to test all other data. If a point is suitable for the estimated model, it is considered to be an inlier.
[0034] (3) If enough points are classified as assumed inliers, then the estimated model is reasonable enough.
[0035] (4) Then, the model is re-estimated using all the inliers of the assumptions, since it has only been estimated by the inliers of the initial assumptions.
[0036] (5) Finally, the model is evaluated by estimating the error rate of the in-place points and the model.
[0037] This process is repeated a preset number of times, and each generated model is either discarded because it has too few inliers or selected because it is better than existing models. In this embodiment of the invention, the method for finding similar regions between the first and second maps using the idea of the random sampling consensus algorithm specifically includes:
[0038] Step S21: Randomly select two feature points A1(x0,y0) and A2(x1,y1) on the first map and connect them to obtain the first vector.
[0039] Step S22: Randomly select two feature points B1(x2,y2) and B2(x3,y3) on the second map and connect them to obtain the second vector. The feature points selected on the first map are different from those selected on the second map;
[0040] Step S23: Find the projection relationship between the first vector and the second vector;
[0041] Step S24: Based on the projection relationship, transform the remaining feature points on the first map except for the two feature points connected to form the first vector to obtain the transformed coordinates corresponding to each feature point;
[0042] Step S25: Based on the transformation coordinates corresponding to each feature point, determine whether there are feature points on the second map within the tolerance range of the transformation coordinates. If there are, the transformation coordinates are matched with feature points on the second map within the tolerance range, and the number of matching feature points is recorded.
[0043] Step S26: Repeat steps S21 to S25 several times, compare the number of matches and select the maximum value;
[0044] Step S27: Based on the feature points on the second map corresponding to the largest number of matches, and the feature points on the first map corresponding to the transformed coordinates of the feature points on the second map before the transformation, the area enclosed by the former on the second map and the area enclosed by the latter on the first map are similar areas.
[0045] In steps S21 and S22, since the first map and the second map are identical, a restriction needs to be added: the same feature points cannot be taken on the first and second maps. That is, feature points A1, A2, B1, and B2 must all be different; otherwise, the subsequent conclusion that the two regions are similar would be meaningless, because the two regions are essentially the same region. Based on the characteristics of overlay maps, a region similar to the original map will grow from a point of inconsistency. The purpose of this embodiment is to find two similar regions on a map and then further determine whether they are overlay maps.
[0046] In step S23, the first vector With the second vector The projection relationship between them can be expressed by the following formula:
[0047]
[0048] Where (x′, y′) represent the coordinates after projection, (x, y) represent the coordinates before projection, R represents the rotation relationship, and T represents the translation relationship. Expanding the above formula, we can obtain...
[0049]
[0050] Where θ represents the first vector With the second vector The angle between them. It should be noted that since the first and second maps only involve planar transformations and the scale remains unchanged, only four points are needed to calculate the rotation relationship, resulting in less data and greatly speeding up the calculation.
[0051] According to the above formula, solving the projection relationship is actually solving the rotation relationship R and the translation relationship T. Based on four selected known points, the specific method for finding the projection relationship between the first vector and the second vector includes:
[0052] Step S231: Subtract the coordinates of the starting point A1(x0,y0) of the first vector from the coordinates of the starting point B1(x2,y2) of the second vector to obtain the translation relationship T(xT,yT) between the first vector and the second vector; where xT = x0 - x2, yT = y0 - y2;
[0053] Step S232: Calculate the inner product of the first vector and the second vector, and the product of the magnitude of the first vector and the magnitude of the second vector. Then divide the inner product by the product to obtain the cosine value of the angle between the first vector and the second vector.
[0054] Step S233: Calculate the angle between the first vector and the second vector based on the cosine value to obtain the rotation relationship R between the first vector and the second vector; wherein, the projection relationship between the first vector and the second vector includes the translation relationship T and the rotation relationship R between the first vector and the second vector.
[0055] After obtaining the translation relationship T and rotation relationship R, any feature point on the first map can be transformed onto the second map. As described in step S24, all feature points on the first map except for A1 and A2 are transformed to obtain the transformed coordinates corresponding to each feature point. If a feature point on the second map exists near a transformed coordinate (within a preset tolerance range), then this transformed coordinate is considered to match the feature point on the second map, that is, the corresponding feature point on the first map matches the feature point on the second map, and the number of matches is recorded. Then, return to step S21 and repeat the process to obtain a number of matches. It should be noted that although feature points A1 and A2 are randomly selected in step S21, points that have already been selected will not be selected again during repeated execution. By finding the projection relationship with the most matches through multiple iterations, the accuracy of judging similar regions can be improved, thereby improving the accuracy of judging overlay maps.
[0056] In step S27, it is clear that the more matching feature points there are, the more similar the environments are. Therefore, it is necessary to find the feature points corresponding to the largest number of matches to determine the similar areas on the first and second maps. Figure 4As shown, the left side represents the first map, and the right side represents the second map. Connecting the matched feature points on the first map yields region M1, and connecting the matched feature points on the second map yields region M2. Regions M1 and M2 are similar regions of the first and second maps. It should be noted again that the first and second maps are the same map; therefore, the similar regions are actually similar regions within the global map currently constructed by the robot. The high similarity between these two regions is highly likely due to image overlay, requiring further evaluation. Furthermore, a threshold needs to be set for the number of matches. Specifically, only when the maximum number of matches accounts for a greater than the set threshold among all feature points (considering only feature points from one map), is it considered that similar regions exist between the first and second maps. Otherwise, it is considered that there are no similar regions between the first and second maps, indicating that image overlay has not occurred.
[0057] During step S3, the existence of two similar regions only indicates a possible overlay of images. Another possibility is that similar regions actually exist in the real environment. Therefore, it is necessary to verify these similar regions. The specific methods for verifying whether the similar regions of the first and second maps match the actual environment include:
[0058] Step S31: The robot navigates to the centroid of a similar region on the first map. If it cannot navigate to the centroid, the similar region on the first map does not match the actual environment. If it successfully navigates to the location, proceed to step S32.
[0059] Step S32: The robot constructs a local map of the current location and then performs relocalization. If the relocalization fails, the similar area of the first map does not match the actual environment. If the relocalization is successful, proceed to step S33.
[0060] Step S33: The robot navigates to the centroid of a similar region on the second map. If it cannot navigate to the centroid, the similar region on the second map does not match the actual environment. If it successfully navigates to the location, proceed to step S34.
[0061] In step S34, the robot constructs a local map of its current location and then performs relocalization. If relocalization fails, the similar area of the second map does not match the actual environment. If relocalization is successful, it is determined that there is no overlay map.
[0062] In performing the above steps, the method for obtaining the centroid of the similar region specifically includes: reading the coordinates of the feature points enclosing the similar region, adding the abscissas and calculating the average to obtain the abscissa of the centroid, adding the ordinates and calculating the average to obtain the ordinate of the centroid, thus obtaining the position of the centroid of the similar region. In short, finding the centroid of n points is equivalent to finding their average value, calculated using the following formula:
[0063]
[0064] After obtaining the centroids of similar regions on the first map, the robot needs to navigate to these locations for on-site verification. Obviously, if there is an overlay, the location might be a virtual image, and the robot will not be able to navigate there normally. Therefore, we first determine whether the robot can navigate to the centroid, specifically: the robot searches for a path to the centroid; if no path is found, it indicates that navigation to the centroid is impossible; if a path is found, but the number of collisions with obstacles during movement exceeds a preset number, it indicates that navigation to the centroid is impossible. Optionally, the robot uses the A* (A* Star) algorithm to search for a path to the centroid on the first map. If the search fails, it indicates that the robot cannot navigate to the centroid, and also indicates a problem with the map, namely, the presence of an overlay. The A* algorithm is a typical heuristic search algorithm, widely used for pathfinding and graph traversal due to its efficiency. It can find an optimal path from the initial state to the target state that avoids obstacles within the workspace. It should be noted that if the A* algorithm finds a path to the centroid, but the robot keeps colliding with obstacles during actual movement and cannot move to the centroid according to the planned path, it can also indicate that there is a problem with the map, and thus it can be inferred that there is an overlay.
[0065] On the other hand, if the robot successfully navigates to the centroid, it indicates that the location is not a virtual image. The robot then proceeds to the next verification step, constructing a local map of the current location using laser sensors and / or vision sensors, and then relocalizing to verify whether the current location matches the corresponding location on the existing global map. Clearly, if they don't match, it indicates a map error and overlay; if they match, it indicates that the similar regions on the first map are correct. Similarly, the similar regions on the second map are verified (this step can be skipped if overlay has already been identified in the previous steps). The map is correct and overlay is determined to be absent only if the robot successfully relocalizes in the similar region of the second map. All other cases indicate a map error and overlay, which will not be elaborated further. The purpose of the robot's relocalization is primarily to match the local map of the current location with the corresponding location on the global map. It's easy to see that if relocalization fails, it indicates that the robot's actual current location does not match its perceived location on the global map, leading to the inference that the map has a problem and overlay exists.
[0066] As a preferred implementation, the robot executes the overlay map judgment method described in this embodiment of the invention when it completes its task and recharges. Since the timing of overlay map occurrence is uncertain, the judgment is made after the robot completes its task and obtains the global map. If overlay map exists, map correction is performed before recharging, which can prevent the disordered map from affecting the robot's next task.
[0067] Based on the above embodiments, when the robot determines that an overlay map has occurred, the robot clears the current map and then rebuilds a new map; alternatively, the robot reads the historical map for relocalization. If the relocalization is successful, the historical map is set as the current map; if the relocalization fails, the map is rebuilt. The map can be rebuilt using a global edge-based method or by using the RRT (Fast Random Tree Search) algorithm. The specific methods for rebuilding the map are not detailed here.
[0068] This invention also provides a chip storing computer program code, which, when executed, implements the steps of the overlay judgment method. Compared with the prior art, the chip transforms feature points on the first map onto the second map through the projection relationship between the first and second maps, finds similar regions in the first and second maps based on matching, and finally verifies the similar regions to determine whether there is an overlay. In calculating the projection relationship, since the first and second maps only involve planar transformations and the scale remains unchanged, only four points are needed to calculate the projection relationship, resulting in less data and significantly faster computation.
[0069] This invention also provides a robot equipped with the chip and configured to execute the steps of the overlay image judgment method. The robot searches for the projection relationship of feature points in the first map and the second map through multiple iterations and selects the one with the most matching points to improve the accuracy of judging similar regions, thereby improving the accuracy of judging overlay images.
[0070] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. References to memory, storage, databases, or other media used in the embodiments provided in this application can all include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable memory (PROM), electrically programmable memory (DPROM), electrically erasable programmable memory (DDPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.
[0071] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0072] The above embodiments are merely illustrative of several implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application.
Claims
1. A method for determining overlay images, applied to a mobile robot, characterized in that, The method includes the following steps: Step S1: Copy the current map to obtain the first map and the second map, and then extract feature points from the first map and the second map; Step S2: Based on the feature points, find similar regions between the first map and the second map using a random sampling consistency algorithm; Step S3: Verify whether the similar areas of the first map and the second map match the actual environment. If they do not match, it is determined that an overlay map has occurred.
2. The method for determining overlapping images according to claim 1, characterized in that, The method further includes: performing Gaussian filtering on the current map before performing step S1 to filter out low-frequency noise.
3. The method for determining overlapping images according to claim 1, characterized in that, In step S1, the method for extracting feature points on the first map and the second map includes either the SURF detection algorithm or the SIFT detection algorithm.
4. The method for determining overlapping images according to claim 1, characterized in that, In step S2, the method for finding similar regions between the first map and the second map using the random sampling consensus algorithm specifically includes: Step S21: Randomly select two feature points on the first map and connect them to obtain the first vector; Step S22: Randomly select two feature points on the second map and connect them to obtain the second vector; wherein the feature points selected on the first map are different from the feature points selected on the second map. Step S23: Find the projection relationship between the first vector and the second vector; Step S24: Based on the projection relationship, transform the remaining feature points on the first map except for the two feature points connected to form the first vector to obtain the transformed coordinates corresponding to each feature point; Step S25: Based on the transformation coordinates corresponding to each feature point, determine whether there are feature points on the second map within the tolerance range of the transformation coordinates. If there are, the transformation coordinates are matched with feature points on the second map within the tolerance range, and the number of matching feature points is recorded. Step S26: Repeat steps S21 to S25 several times, compare the number of matches and select the maximum value; Step S27: Based on the feature points on the second map corresponding to the largest number of matches, and the feature points on the first map corresponding to the transformed coordinates of the feature points on the second map before the transformation, the area enclosed by the former on the second map and the area enclosed by the latter on the first map are similar areas.
5. The method for determining overlapping images according to claim 4, characterized in that, In step S23, the method for finding the projection relationship between the first vector and the second vector specifically includes: Step S231: Subtract the coordinates of the starting point of the first vector from the coordinates of the starting point of the second vector to obtain the translation relationship between the first vector and the second vector; Step S232: Calculate the inner product of the first vector and the second vector, and the product of the magnitude of the first vector and the magnitude of the second vector. Then divide the inner product by the product to obtain the cosine value of the angle between the first vector and the second vector. Step S233: Calculate the angle between the first vector and the second vector based on the cosine value to obtain the rotational relationship between the first vector and the second vector; The projection relationship between the first vector and the second vector includes the translation relationship and the rotation relationship between the first vector and the second vector.
6. The method for determining overlapping images according to claim 1, characterized in that, In step S3, the method for verifying whether the similar areas of the first map and the second map match the actual environment specifically includes: Step S31: The robot navigates to the centroid of a similar region on the first map. If it cannot navigate to the centroid, the similar region on the first map does not match the actual environment. If it successfully navigates to the location, proceed to step S32. Step S32: The robot constructs a local map of the current location and then performs relocalization. If the relocalization fails, the similar area of the first map does not match the actual environment. If the relocalization is successful, proceed to step S33. Step S33: The robot navigates to the centroid of a similar region on the second map. If it cannot navigate to the centroid, the similar region on the second map does not match the actual environment. If it successfully navigates to the location, proceed to step S34. In step S34, the robot constructs a local map of its current location and then performs relocalization. If relocalization fails, the similar area of the second map does not match the actual environment. If relocalization is successful, it is determined that there is no overlay map.
7. The method for determining overlapping images according to claim 6, characterized in that, The method for obtaining the centroid of the similar regions specifically includes: Read the coordinates of the feature points that enclose the similar region, add the x-coordinates and calculate the average to obtain the x-coordinate of the centroid, add the y-coordinates and calculate the average to obtain the y-coordinate of the centroid, and thus obtain the position of the centroid of the similar region.
8. The method for determining overlay images according to claim 6, characterized in that, The specific methods for determining whether a robot can navigate to its center of mass include: The robot searches for a path to the center of mass. If no path is found, it indicates that it cannot navigate to the center of mass. If a path is found, but the number of collisions with obstacles during movement exceeds a preset number, it indicates that it cannot navigate to the center of mass.
9. The method for determining overlapping images according to claim 1, characterized in that, The method further includes: after determining in step S3 that an overlay map has occurred, the robot clears the current map and then rebuilds the map; or, the robot reads the historical map for relocation, and if the relocation is successful, the historical map is set as the current map, and if the relocation fails, the map is rebuilt.
10. A chip storing computer program code, characterized in that, When the computer program code is executed, it implements the steps of the overlay image determination method according to any one of claims 1 to 9.
11. A robot, characterized in that, The robot is equipped with the chip described in claim 10.
Citation Information
Patent Citations
Autonomous mobile robot, map splicing method and device thereof and readable storage medium
CN110705519A
Autonomous mobile robot, map splicing method and device thereof and readable storage medium
CN110796598A