A skeleton graph-based relocalization method, chip, and mobile robot
Through the skeleton graph-based relocalization method, the problem of low accuracy and efficiency in the relocalization process of indoor intelligent mobile robots is solved by matching feature points of local and global maps, and a more efficient and accurate relocalization effect is achieved.
Patent Information
- Application Number
- CN202110643721.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-09
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-06-09
AI Technical Summary
In the existing technology, indoor intelligent mobile robots are easily affected by environmental changes during the relocation process, resulting in unstable relocation performance and low relocation accuracy and efficiency.
A skeleton graph-based relocalization method is adopted. By constructing a local map and generating a skeleton graph, feature points that meet the preset conditions are extracted. The correlation on the skeleton graph is used for map matching. Double matching is performed by combining the feature points of the local and global maps, reducing the amount of calculation and improving the matching accuracy.
The repositioning efficiency and accuracy of the mobile robot are improved, the impact of environmental changes on repositioning is reduced, and the robot can quickly and accurately determine its own position and orientation.
Smart Images

Figure CN115525044B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile robots, and in particular to a skeleton graph-based repositioning method, chip and mobile robot. Background Art
[0002] At present, most indoor intelligent mobile robots have the ability to locate and navigate autonomously, that is, they locate their own position and posture according to the existing map data during the execution of the task, and then realize autonomous navigation. When the robot has a map but does not know where it is located on the map, it needs to be relocated. Specifically, during the navigation process, the robot will perceive the surrounding environment information accordingly, and use the existing map data to confirm whether there is a navigation error. Then, if it is confirmed that there is a navigation error, it will adjust the current navigation position according to the perceived environmental information and the existing map data. Relocation is often the first step for a robot to start working, and the success or failure of relocation is a prerequisite for its normal operation afterwards. Therefore, how to reduce the degree to which the relocation performance is affected by environmental changes and improve the accuracy and efficiency of relocation are technical problems that need to be solved to improve the relocation effect of robots for those skilled in the art. Summary of the Invention
[0003] To solve the above problems, the present invention provides a skeleton graph-based relocalization method, chip, and mobile robot, which greatly improves the relocalization efficiency and accuracy of the mobile robot. The specific technical solutions of the present invention are as follows:
[0004] A repositioning method based on a skeleton graph comprises the following steps: step S1, a mobile robot performs repositioning, constructs a local map of the current position, then generates a skeleton graph representing the connectivity of the local map, and finds feature points that meet preset conditions on the skeleton graph; wherein a global map, a skeleton graph representing the connectivity of the global map, and feature points that meet preset conditions are stored on the mobile robot; step S2, the mobile robot uses the skeleton graph representing the connectivity of the local map to match the skeleton graph representing the connectivity of the global map, and obtains the corresponding position of the local map in the global map, which is recorded as a first position; step S3, based on the skeleton graph representing the connectivity of the local map, the mobile robot extracts feature points in a preset area area directly in front of a position that meets the preset conditions, and then matches them with the feature points in the first position, and obtains the corresponding position of the preset area area directly in front of the position of the mobile robot that meets the preset conditions in the global map, which is recorded as a second position; step S4, based on the second position and the feature points in the position, the current posture of the mobile robot is calculated to achieve repositioning. Compared with the existing technology, this technical solution uses correlated feature points on the skeleton map for map matching to achieve the repositioning of the mobile robot. On the one hand, it can reduce the amount of calculation, and on the other hand, it can improve the matching accuracy. At the same time, this technical solution adopts a dual matching strategy, first using the local map to match the global map, which can quickly determine the approximate position of the mobile robot and also improve the accuracy of subsequent matching of small areas with a preset area.
[0005] Furthermore, the method for generating a skeleton graph representing the connectivity of a local map in step S1 specifically includes: step S11, extracting and determining the edge points of obstacles in the local map; if there are no other edge points within the eight-neighborhood of the edge point, the edge point is deemed an isolated point and deleted, retaining the remaining edge points and proceeding to step S12; step S12, constructing a Delaunay triangulation based on the remaining edge points in step S11, and then generating the perpendicular bisectors of each edge of each triangle; step S13, constructing Thiessen polygons with the perpendicular bisectors as edges and the intersection of the perpendicular bisectors as vertices, and deleting the Delaunay triangulation to obtain the skeleton graph. Deleting isolated points can make the map as simple as possible, facilitating the subsequent identification of feature points; the skeleton graph can reflect the connected domain information of the map.
[0006] Furthermore, the method for finding feature points that meet preset conditions on the skeleton graph in step S1 specifically includes: step S14, superimposing the skeleton graph representing the connectivity of the local map onto the local map, and then, with the pixel point in the skeleton graph as the center, determining whether the number of pixel transformations within the eight-neighborhood of the pixel point is 0, if so, proceeding to step S15, if not, determining the next pixel point; step S15, determining whether the pixel point with the number of pixel transformations within the eight-neighborhood is 0 is a vertex of the skeleton graph, if so, setting it as the feature point, if not, returning to step S14; wherein the feature point includes association information of other feature points connected to the point. The feature points on the skeleton graph have association, which can improve the accuracy of map matching; only taking points with the number of pixel transformations within the eight-neighborhood as 0 can avoid the uncertainty of the map boundary that causes the feature points of the local map and the global map to be unable to match.
[0007] Furthermore, the method for determining the number of pixel transformations in step S14 specifically includes: step S141, after superimposing a skeleton graph representing the connectivity of the local map onto the local map, traversing all points in the eight-neighborhood of a pixel point in the skeleton graph, wherein the traversal starting point is any point and the traversal end point is the same as the traversal starting point; step S142, during the traversal process, if the colors of two adjacent points are inconsistent, a pixel transformation is recorded, and the number of pixel transformations of the pixel point can be obtained after the traversal is completed; wherein, different colors are used to mark open areas and obstacle areas on the local map. Using different colors to mark passable areas and obstacle areas ensures that pixels at different locations have different pixel transformation times, which facilitates distinction and use.
[0008] Furthermore, the method for obtaining the first position in step S2 specifically includes: using a skeleton graph representing the connectivity of the local map to traverse the skeleton graph representing the connectivity of the global map and perform a determination. If all feature points are detected to overlap and the association information between the feature points is consistent, the corresponding area on the global map is used as the corresponding position of the local map in the global map; if no overlap is detected, the mobile robot is moved to the next position or the mobile robot is moved to the next position so as to continue to relocate the mobile robot based on the skeleton graph when the mobile robot is at the next position. The local map has many feature points and rich association information between the feature points. Using the local map for matching first can accurately determine the approximate position of the mobile robot and reduce the probability of subsequent matching failure in the preset area.
[0009] Furthermore, in step S3, the method for determining the preset area directly in front of the orientation that meets the preset conditions specifically includes: step S31, the mobile robot plans an area of preset area directly in front of the direction of its head and records the number of feature points in the area; step S32, rotates the area once every preset angle, and records the number of feature points in the area after each rotation; step S33, compares the number of feature points in the areas corresponding to different rotation angles, and takes the area corresponding to the rotation angle with the largest number of feature points as the preset area directly in front of the orientation that meets the preset conditions, and records the rotation angle; wherein the preset area is a rectangle, the sides of the rectangle are tangent to the sides of the mobile robot, and the mobile robot is a circular robot with a known radius. Setting an area of preset area around the mobile robot body and matching it with the first position can further determine the specific coordinates and orientation of the mobile robot in the first position.
[0010] Furthermore, in the step S3, the method in which the mobile robot extracts feature points in the preset area area directly in front of the orientation that meets the preset conditions, and then matches them with the feature points at the first position specifically includes: using the preset area area directly in front of the orientation that meets the preset conditions to traverse the first position and make a judgment; if it is detected that all feature points overlap and the association information between the feature points is consistent, the corresponding area in the first position is used as the corresponding position of the preset area area directly in front of the orientation of the mobile robot that meets the preset conditions in the global map; if not detected, the feature points in the corresponding areas at other rotation angles in step S33 are used to match the feature points at the first position, or the mobile robot moves to the next position or moves the mobile robot to the next position to continue to reposition the mobile robot based on the skeleton graph when the mobile robot is in the next position.
[0011] Furthermore, the method for calculating the current posture of the mobile robot in step S4 specifically includes: step S41, reading the coordinates of the center point of the second position and the coordinates of any feature point in the second position that does not coincide with the center point, and then finding the point tangent to the mobile robot at the second position and connecting it with the center point to obtain a line segment; step S42, making a perpendicular line between the feature point taken in step S41 and the line segment, obtaining the intersection point of the perpendicular line and the line segment and its coordinates, if the intersection point falls on the line segment, then the angle between the line segment and the line connecting the center point and the feature point can be obtained by the cosine theorem, if the intersection point falls on the extension line of the line segment, then the angle between the line segment and the line connecting the center point and the feature point can be obtained by the cosine theorem. The angle between the two lines is then calculated through mathematical operations. In step S43, the length of the line segment and the radius of the mobile robot are added to obtain the distance between the center point and the center of the mobile robot. The distance between the feature point and the center of the mobile robot is then calculated using the law of cosines, combining the length of the line connecting the center point and the feature point with the angle. In step S44, based on the coordinates of the center point, the coordinates of the feature point obtained in step S41, the distance between the center point and the center of the mobile robot, and the distance between the feature point and the center of the mobile robot, two linear equations are constructed using a distance formula to obtain the coordinates of the center of the mobile robot. These equations are then combined with the rotation angle to obtain the current position of the mobile robot. The calculation logic is simple and the coordinates of the mobile robot can be quickly calculated.
[0012] A mobile robot equipped with a sensor for scanning environmental information is used to implement the skeleton graph-based relocalization method. The mobile robot includes: a skeleton graph generation module for generating a skeleton graph representing the connectivity of a local map; a feature point determination module for finding feature points on the skeleton graph that meet preset conditions; a feature point matching module for matching feature points in the skeleton graph when using the skeleton graph representing the connectivity of the local map to match the skeleton graph representing the connectivity of the global map, and for matching feature points in a predetermined area directly in front of the mobile robot that meet the preset conditions with feature points in the local map at corresponding positions in the global map; and a pose calculation module for calculating the current pose of the mobile robot. The mobile robot stores a global map, a skeleton graph representing the connectivity of the global map, and feature points that meet the preset conditions. Compared to the prior art, the present technical solution uses the feature point matching module to match feature points on the skeleton graph representing the connectivity of the local map with the skeleton graph representing the connectivity of the global map, thereby gradually determining the specific position of the mobile robot. The pose calculation module then calculates the accurate pose of the mobile robot.
[0013] A chip storing computer program code that, when executed, implements the steps of the skeleton graph-based relocalization method. Compared to existing technologies, this solution can improve the efficiency and accuracy of mobile robot relocalization by matching related feature points. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a flow chart of a skeleton graph-based relocalization method according to an embodiment of the present invention.
[0015] Figure 2 A schematic diagram of a skeleton diagram according to an embodiment of the present invention.
[0016] Figure 3 A schematic diagram of pixel transformation according to an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following is a further description of the specific embodiments of the present invention with reference to the accompanying drawings. It should be noted that the following detailed description is illustrative and is intended to further illustrate the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as commonly understood by those of ordinary skill in the art to which this application belongs.
[0018] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0019] In this embodiment, after the mobile robot is started or triggered to relocate, the mobile robot scans the surrounding environment through sensors to build a local map. Specifically, taking the sweeping robot as an example, a local probability grid can be established based on a single-line laser radar, or a local grid map can be established based on a visual sensor. The global map is when the mobile robot is used for the first time, using the various sensors it carries (for example: accelerometer, gyroscope, ultrasonic rangefinder, camera, single-line laser radar, etc.) to search the movement area of each room, sense the position, shape and size of each room, as well as the position, shape and size of the obstacles encountered, and draw an environmental boundary map based on this. The map of the entire room is drawn by recording while walking indoors, and the map includes obstacle areas, open areas and unknown areas.
[0020] An embodiment of the present invention discloses a relocation method based on a skeleton graph, such as Figure 1As shown, the method includes the following steps:
[0021] In step S1, the mobile robot relocates, constructs a local map of the current location, then generates a skeleton graph representing the connectivity of the local map, and finds feature points that meet preset conditions on the skeleton graph; wherein the mobile robot stores a global map, a skeleton graph representing the connectivity of the global map, and feature points that meet preset conditions.
[0022] In the process of executing step S1, the method for generating a skeleton graph representing the connectivity of the local map specifically includes: step S11, extracting the edge points of the obstacles in the local map and making a judgment. If there are no other edge points in the eight neighborhoods of the edge point, the edge point is regarded as an isolated point and deleted to make the map as simple as possible, which is convenient for finding feature points later. The remaining edge points are retained and the process proceeds to step S12; step S12, constructing a Delaunay triangulation based on the remaining edge points in step S11, and then generating the perpendicular bisector of each side of each triangle; step S13, constructing a Thiessen polygon with the perpendicular bisector as the edge and the intersection of the perpendicular bisector as the vertex. After deleting the Delaunay triangulation, the following can be obtained. Figure 2 The skeleton diagram shown in Figure 2 The left side shows the superposition of the skeleton graph and the static map, and the right side shows the skeleton graph alone. The skeleton graph can reflect the connected domain information of the map, so the feature points on the skeleton graph are correlated, which can improve the accuracy of map matching.
[0023] After obtaining the skeleton graph, the method of finding the feature points that meet the preset conditions includes:
[0024] Step S14: Superimpose the skeleton graph representing the connectivity of the local map onto the local map. Then, taking the pixel point in the skeleton graph as the center, determine whether the number of pixel transformations in the eight-neighborhood area of the pixel point is 0. If so, proceed to step S15. If not, determine the next pixel point.
[0025] Step S15, determining whether the pixel point with 0 pixel transformation times in the eight neighborhoods is a vertex of the skeleton graph, if so, setting it as the feature point, otherwise returning to step S14; wherein the feature point includes association information of other feature points connected to the point.
[0026] The method for determining the number of pixel transformations in step S14 specifically includes:
[0027] Step S141: After superimposing the skeleton graph representing the connectivity of the local map onto the local map, all points in the eight neighborhoods of a pixel point in the skeleton graph are traversed, wherein the traversal starting point is any point and the traversal end point is the same as the traversal starting point. Figure 3, there are eight points 1-8 in the eight-neighborhood with pixel 0 as the center point. If the traversal starting point is pixel 1, the traversal order is 1-2-3-4-5-6-7-8-1. For another example, if the traversal starting point is pixel 3, the traversal order is 3-4-5-6-7-8-1-2-3. In this embodiment, the traversal starting point is pixel 1. Step S142, during the traversal process, if the colors of two adjacent points are inconsistent, a pixel transformation is recorded. After the traversal is completed, the number of pixel transformations of the pixel point can be obtained; wherein, different colors are used to mark open areas and obstacle areas on the local map.
[0028] Reference Figure 3 (a), where white pixels 1, 3, and 6 represent points in the open area, and black pixels 2, 4, 5, 7, and 8 represent points in the obstacle area. Similarly, Figure 3 In (b), the white pixel 2 represents a point in the open area, and the black pixels 1, 3, 4, 5, 6, 7, and 8 represent points in the obstacle area. Figure 3 In (a), we start from pixel 1 and record the color inconsistency between adjacent pixels 1 and 2, the color inconsistency between pixels 2 and 3, the color inconsistency between pixels 3 and 4, and so on. Figure 3 In (a), there are 6 pairs of adjacent points with inconsistent colors, that is, there are 6 pixel transformations in the eight-neighborhood with pixel 0 as the center. Using the same method, Figure 3 (b) There are two pixel transformations. It is not difficult to see that the pixel points with a pixel transformation count of 0 in the eight-neighborhood area centered on the pixel point in the skeleton map represent points in the open area (or points that are not close to the obstacle area). Taking only points in the open area as feature points can avoid the uncertainty of the map boundary, which causes the feature points of the local map and the global map to be unable to match. The uncertainty of the map boundary is caused by the low accuracy of the sensor on the one hand, and the current boundary may not be the real boundary; on the other hand, it is also related to the maximum detection distance of the sensor. When the mobile robot constructs a local map, when it exceeds the maximum detection distance of the sensor, the area outside is the unknown area. The number of pixel transformations of the points at the junction of the local map and the unknown area is uncertain, so in this embodiment, only points in the determined open area are taken as feature points.
[0029] It should be noted that when constructing a local map (similar to the global map), due to the relatively complex environment of the target area, in order to express the characteristics of each local area within the target area, each grid cell can be assigned a corresponding grid state based on the conditions of each object in the image. The grid state represents the condition of a pixel at that location in the image. A pixel can be a pixel with a detected obstacle, a pixel with no obstacles, or a pixel with an uncertain state. Therefore, grid states include a no-obstacle state, an obstacle-present state, and an uncertain state. Accordingly, each grid state can be quantified. In this embodiment, a grayscale value of 255 for a grid cell indicates a no-obstacle state. That is, all grid cells in a detected, obstacle-free area are marked white. A grayscale value of 0 for a grid cell indicates an obstacle state. That is, all grid cells in a detected, obstacle-free area are marked black. A grayscale value of 0-225 for a grid cell indicates an uncertain state. That is, all grid cells in an uncertain area are marked gray. To simplify the map, all pixels where the grid values are 0-128 are marked as 0, that is, represented by black, and all pixels where the grid values are 129-255 are marked as 255, that is, represented by white.
[0030] In this embodiment, the open area is composed of a plurality of blank pixels, and the obstacle area is composed of a plurality of black pixels. The pixel characteristics of the pixels in the open area and the obstacle area are different. The pixel characteristics can be represented by any suitable identifier, such as a grayscale value or a custom grid value. For example, the grayscale value of each pixel in the obstacle area is 0, and the grayscale value of each pixel in the open area is 255. For another example, the grid value of each pixel in the obstacle area is 0, and the grid value of each pixel in the open area is 1.
[0031] In step S2, the mobile robot matches the skeleton graph representing the connectivity of the local map with the skeleton graph representing the connectivity of the global map to obtain the corresponding position of the local map in the global map, which is recorded as the first position.
[0032] It should be noted that, since the feature points on the skeleton image have been extracted in the above steps, when matching the skeleton image, the feature points are actually used instead of the entire skeleton image, which greatly reduces the amount of calculation and improves the matching efficiency.
[0033] During step S2, the method for obtaining the first position specifically includes: using a skeleton graph representing the connectivity of the local map to traverse the skeleton graph representing the connectivity of the global map and performing a determination. If all feature points are detected to overlap and the association information between the feature points is consistent, the corresponding area on the global map is used as the corresponding position of the local map in the global map; if no overlap is detected, the mobile robot is moved to the next position or the mobile robot is moved to the next position so as to continue relocating the mobile robot based on the skeleton graph when the mobile robot is at the next position. Since the local map has a large number of feature points and rich association information between the feature points, using the local map for matching first can accurately determine the approximate position of the mobile robot and reduce the probability of subsequent matching failures in the preset area.
[0034] If, after the traversal, the feature points are found to not completely overlap, but to be within the permitted tolerance range—for example, if the difference between two feature points is only one or two pixels—then the feature points are considered to overlap. After detecting feature point overlap, further determination is needed to determine whether the associated information between the feature points is consistent, that is, whether the connection relationships between the points are consistent. Combining these two pieces of information can improve matching accuracy.
[0035] In step S3, based on the skeleton graph representing the connectivity of the local map, the mobile robot extracts feature points in the preset area area directly in front of the orientation that meets the preset conditions, and then matches them with the feature points in the first position to obtain the corresponding position of the preset area area directly in front of the orientation of the mobile robot that meets the preset conditions in the global map, which is recorded as the second position.
[0036] During step S3, the method for determining the preset area directly in front of the direction that meets the preset conditions specifically includes:
[0037] In step S31, the mobile robot plans an area of a preset size directly in front of its head and records the number of feature points in the area; in step S32, the area is rotated once at a preset angle, and the number of feature points in the area after each rotation is recorded; in step S33, the number of feature points in the areas corresponding to different rotation angles is compared, and the area corresponding to the rotation angle with the largest number of feature points is taken as the preset area directly in front of the orientation that meets the preset conditions, and the rotation angle is recorded at the same time; wherein, the preset area is a rectangle, the sides of the rectangle are tangent to the sides of the mobile robot, and the mobile robot is a circular robot with a known radius.
[0038] The preset angle is preferably 90 degrees. This means that the number of feature points in the preset areas directly in front of, to the left of, to the right of, and behind the mobile robot is compared. Assuming the area directly in front of the mobile robot has the largest number of feature points, that area is used for subsequent matching. It should be noted that the rotation angle is 0 degrees in this case.
[0039] After confirming the area of a preset area directly in front of the orientation that meets the preset conditions, the method for matching the area with the feature points at the first position specifically includes: traversing the first position using the area of the preset area directly in front of the orientation that meets the preset conditions and performing a determination. If all feature points are detected to overlap and the association information between the feature points is consistent, the corresponding area in the first position is used as the corresponding position of the area of the preset area directly in front of the orientation that meets the preset conditions in the global map; if no feature points are detected, the feature points in the area corresponding to other rotation angles in step S33 are matched with the feature points at the first position, or the mobile robot is moved to the next position or is moved to the next position to continue relocalizing the mobile robot based on the skeleton graph when the mobile robot is at the next position. In this process, the matching method is the same as the matching method in step S2 and will not be repeated. It should be noted that if the first matching fails, the feature points in the area corresponding to other rotation angles in step S33 are matched with the feature points at the first position, such as the area of the preset area directly to the right of the mobile robot, in which case the rotation angle is 90 degrees. In this embodiment, the rotation angle is preferably taken as clockwise.
[0040] Step S4: Calculate the current position and posture of the mobile robot based on the second position and the feature points in the position to achieve repositioning.
[0041] In the above steps, the mobile robot determines the corresponding position of the preset area in front of the orientation that meets the preset conditions in the global map. In this way, the coordinate information of the feature points in the preset area in the global map is known. The method of calculating the current posture of the mobile robot using the coordinate information specifically includes:
[0042] Step S41 reads the coordinates of the center point of the second position and any feature point in the second position that does not coincide with the center point. Then, a point at which the second position is tangent to the mobile robot is found and connected to the center point to obtain a line segment. Because the preset area is rectangular, taking the center point directly determines the length of the line segment, simplifying calculations.
[0043] Step S42, draw a perpendicular line between the feature point taken in step S41 and the line segment, obtain the intersection point and coordinates of the perpendicular line and the line segment, if the intersection point falls on the line segment, then the angle between the line segment and the line connecting the center point and the feature point can be obtained by the cosine theorem, if the intersection point falls on the extension line of the line segment, then the complementary angle of the angle between the line segment and the line connecting the center point and the feature point can be obtained by the cosine theorem, and then the angle can be obtained through mathematical calculation.
[0044] In step S43, the sum of the length of the line segment and the radius of the mobile robot is calculated to determine the distance between the center point and the center of the mobile robot circle. The distance between the feature point and the center of the mobile robot circle is then calculated using the law of cosines, combining the length of the line connecting the center point and the feature point with the included angle. The coordinates of the circle center cannot be calculated from the known coordinates of the center point and the distance between the center point and the center of the mobile robot circle. Therefore, another known condition related to the circle center must be calculated.
[0045] In step S44, based on the coordinates of the center point, the coordinates of the feature points obtained in step S41, the distance between the center point and the center of the mobile robot, and the distance between the feature points and the center of the mobile robot, two linear equations of two variables are constructed using the distance formula to solve the coordinates of the center of the mobile robot. Then, combined with the rotation angle, the current position of the mobile robot can be obtained. The center coordinates are the position of the mobile robot in the global map. After determining the direction of the head, repositioning can be achieved. Taking the above two cases as an example, when the rotation angle is 0 degrees, the direction of the line connecting the center of the mobile robot and the center point is the direction of the mobile robot; when the rotation angle is 90 degrees, the direction of the mobile robot is the direction of the line connecting the center of the mobile robot and the center point rotated 90 degrees counterclockwise.
[0046] The present invention also discloses a mobile robot equipped with sensors for scanning environmental information, such as laser sensors and / or visual sensors, and further comprising: a skeleton graph generation module for generating a skeleton graph representing the connectivity of a local map; a feature point determination module for finding feature points on the skeleton graph that meet preset conditions; a feature point matching module for matching feature points in the skeleton graph when using the skeleton graph representing the connectivity of the local map to match the skeleton graph representing the connectivity of the global map, and for matching feature points in a predetermined area directly in front of the mobile robot that meets the preset conditions with feature points in the corresponding positions of the local map in the global map; and a pose calculation module for calculating the current pose of the mobile robot. The mobile robot stores a global map, a skeleton graph representing the connectivity of the global map, and feature points that meet the preset conditions. Compared to the prior art, the mobile robot uses the feature point matching module to match feature points on the skeleton graph representing the connectivity of the local map with the skeleton graph representing the connectivity of the global map, thereby gradually determining the specific position of the mobile robot. The pose calculation module then calculates the accurate pose of the mobile robot.
[0047] The present invention also discloses a chip for storing computer program code and can be set in the aforementioned mobile robot. When the computer program code is executed, it implements the steps of the aforementioned skeleton graph-based relocalization method. Alternatively, when the chip executes the computer program code, it implements the functions of the various modules in the aforementioned mobile robot embodiment. Exemplarily, the computer program code can be divided into one or more modules / units, and the one or more modules / units are stored in the chip and executed by the chip to complete the present application. The one or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program code in the mobile robot. For example, the computer program code can be divided into: a skeleton graph generation module, a feature point determination module, a feature point matching module, and a posture calculation module in the aforementioned mobile robot embodiment. Compared with the prior art, the chip can enable the mobile robot to improve the relocalization efficiency and accuracy by matching related feature points.
[0048] Obviously, the above-mentioned embodiments are only some embodiments of the present invention, rather than all embodiments, and the technical solutions between the various embodiments can be combined with each other. In addition, if the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like appear in the embodiments, the orientation or position relationship indicated is based on the orientation or position relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. If the terms "first", "second", "third" and the like appear in the embodiments, it is to facilitate the distinction between related features and cannot be understood as indicating or implying their relative importance, order or number of technical features.
[0049] 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 the present invention, or the portion 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 for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), a mobile hard drive, a magnetic disk, or an optical disk.
[0050] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A skeleton graph-based relocalization method, characterized in that: The method comprises the following steps: Step S1: The mobile robot relocalizes, constructs a local map of its current location, generates a skeleton graph representing the connectivity of the local map, and finds feature points on the skeleton graph that meet preset conditions. The mobile robot stores a global map, a skeleton graph representing the connectivity of the global map, and feature points that meet preset conditions. Step S2: The mobile robot matches the skeleton graph representing the connectivity of the local map with the skeleton graph representing the connectivity of the global map to obtain the corresponding position of the local map in the global map, which is recorded as the first position. Step S3: Based on the skeleton graph representing the connectivity of the local map, the mobile robot extracts feature points in a predetermined area directly in front of the position that meets the preset conditions, and then matches them with the feature points in the first position to obtain a corresponding position of the predetermined area directly in front of the position that meets the preset conditions in the global map, which is recorded as the second position. In step S3, the method of extracting feature points in the preset area area directly in front of the orientation that meets the preset conditions by the mobile robot and then matching them with the feature points at the first position specifically includes: traversing the first position using the preset area area directly in front of the orientation that meets the preset conditions and performing a judgment; if it is detected that all feature points overlap and the association information between the feature points is consistent, then using the corresponding area in the first position as the corresponding position of the preset area area directly in front of the orientation of the mobile robot that meets the preset conditions in the global map; Step S4, calculating the current posture of the mobile robot based on the second position and the feature points in the position to achieve repositioning; The method for calculating the current posture of the mobile robot in step S4 specifically includes: Step S41, reading the coordinates of the center point of the second position and the coordinates of any feature point in the second position that does not coincide with the center point, then finding a point at which the second position is tangent to the mobile robot and connecting it to the center point to obtain a line segment; Step S42: Draw a perpendicular line between the feature point taken in step S41 and the line segment, and obtain the intersection point and its coordinates. If the intersection point falls on the line segment, the angle between the line segment and the line connecting the center point and the feature point can be obtained by the cosine theorem. If the intersection point falls on the extension line of the line segment, the supplementary angle of the angle between the line segment and the line connecting the center point and the feature point can be obtained by the cosine theorem. Then, the angle can be obtained by further mathematical calculation. Step S43, calculating the sum of the length of the line segment and the radius of the mobile robot to obtain the distance between the center point and the center of the mobile robot circle, and then combining the length of the line connecting the center point and the feature point with the included angle to obtain the distance between the feature point and the center of the mobile robot circle using the law of cosines; Step S44: Based on the coordinates of the center point, the coordinates of the feature points obtained in step S41, the distance between the center point and the center of the mobile robot, and the distance between the feature points and the center of the mobile robot, two linear equations of two variables are constructed using a distance formula to obtain the coordinates of the center of the mobile robot. The coordinates of the center of the mobile robot are then combined with the rotation angle to obtain the current posture of the mobile robot. The method of generating a skeleton graph representing the connectivity of the local map in step S1 specifically includes: Step S11, extracting the edge points of the obstacle in the local map and performing a judgment. If there are no other edge points in the eight neighborhoods of the edge point, the edge point is regarded as an isolated point and deleted, and the remaining edge points are retained and the process proceeds to step S12; Step S12, constructing a Delaunay triangulation based on the remaining edge points in step S11, and then generating the perpendicular bisector of each side of each triangle; Step S13, constructing Thiessen polygons with the perpendicular bisectors as edges and the intersections of the perpendicular bisectors as vertices, and deleting the Delaunay triangulation to obtain the skeleton graph.
2. A skeleton graph-based relocation method according to claim 1, characterized in that: The method of finding the feature points meeting the preset conditions on the skeleton graph in step S1 specifically includes: Step S14: Superimpose the skeleton graph representing the connectivity of the local map onto the local map. Then, taking the pixel point in the skeleton graph as the center, determine whether the number of pixel transformations in the eight-neighborhood area of the pixel point is 0. If so, proceed to step S15. If not, determine the next pixel point. Step S15, determining whether the pixel point with 0 pixel transformation times in the eight neighborhoods is a vertex of the skeleton graph, if so, setting it as the feature point, otherwise returning to step S14; wherein the feature point includes association information of other feature points connected to the point.
3. A skeleton graph-based relocation method according to claim 2, characterized in that: The method for determining the number of pixel transformations in step S14 specifically includes: Step S141: After superimposing the skeleton graph representing the connectivity of the local map onto the local map, all points in the eight-neighborhood of a pixel point in the skeleton graph are traversed, wherein the traversal starting point is any point and the traversal end point is the same as the traversal starting point; Step S142: During the traversal process, if the colors of two adjacent points are inconsistent, a pixel transformation is recorded. After the traversal is completed, the number of pixel transformations of the pixel point can be obtained; wherein, different colors are used to mark open areas and obstacle areas on the local map.
4. A skeleton graph-based relocation method according to claim 2, characterized in that: The method for obtaining the first position in step S2 specifically includes: using a skeleton graph representing the connectivity of a local map to traverse the skeleton graph representing the connectivity of a global map and make a judgment; if it is detected that all feature points overlap and the association information between the feature points is consistent, the corresponding area on the global map is used as the corresponding position of the local map in the global map; if not detected, the mobile robot moves to the next position or moves the mobile robot to the next position, so as to continue to reposition the mobile robot based on the skeleton graph when the mobile robot is at the next position.
5. A skeleton graph-based relocation method according to claim 2, characterized in that: In step S3, the method for determining the preset area directly in front of the direction that meets the preset conditions specifically includes: Step S31: The mobile robot plans an area of a preset size in front of its head and records the number of feature points in the area; Step S32, rotating the region once per a preset angle, and recording the number of feature points in the region after each rotation; Step S33, comparing the number of feature points in the areas corresponding to different rotation angles, taking the area corresponding to the rotation angle with the largest number of feature points as the preset area directly in front of the orientation that meets the preset conditions, and recording the rotation angle at the same time; The preset area is a rectangle, the sides of the rectangle are tangent to the sides of the mobile robot, and the mobile robot is a circular robot with a known radius.
6. A skeleton graph-based relocation method according to claim 5, characterized in that: In step S3, the method wherein the mobile robot extracts feature points in a predetermined area directly in front of the position that meets the predetermined conditions and then matches the feature points with the feature points at the first position further includes: If it is not detected that all feature points overlap and the association information between the feature points is consistent, the feature points in the corresponding areas at other rotation angles in step S33 are matched with the feature points at the first position, or the mobile robot is moved to the next position or the mobile robot is moved to the next position to continue to reposition the mobile robot based on the skeleton graph when the mobile robot is at the next position.
7. A mobile robot equipped with a sensor for scanning environmental information, characterized in that: The mobile robot is used to implement the skeleton graph-based relocalization method according to any one of claims 1 to 6, and the mobile robot comprises: A skeleton graph generation module, used to generate a skeleton graph representing the connectivity of the local map; A feature point determination module is used to find feature points on the skeleton graph that meet preset conditions; a feature point matching module for matching feature points in a skeleton graph representing connectivity of a local map with a skeleton graph representing connectivity of a global map, and for matching feature points in a preset area directly in front of the mobile robot for extracting a position that satisfies a preset condition with feature points in the local map at corresponding positions in the global map; The posture calculation module is used to calculate the current posture of the mobile robot; The mobile robot stores a global map, a skeleton graph representing the connectivity of the global map, and feature points that meet preset conditions.
8. A chip for storing computer program code, characterized in that: When the computer program code is executed, the steps of the skeleton graph-based repositioning method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Rapid mapping method, chip and mobile robot
CN115451935A