Laser repositioning method, device, equipment and storage medium for mobile robot
By constructing a line feature set of raster maps and laser point cloud data and matching feature line segments using a nonlinear optimization algorithm, the problems of excessive computing resource consumption and initial value sensitivity of existing laser SLAM relocalization solutions are solved, and an efficient relocalization process is achieved.
Patent Information
- Application Number
- CN202210828448.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-07-13
AI Technical Summary
Existing laser SLAM relocalization solutions have deficiencies in initial value sensitivity and computational requirements, resulting in relocalization failure or excessive consumption of computing resources.
By constructing a line feature set of raster maps and laser point cloud data, a nonlinear optimization algorithm is used to match feature line segments, optimize the relocation initial pose search, and reduce the search complexity.
Reduces the number of iterations during the relocalization process from exponential to linear, increasing computation speed and saving computation time and resources.
Smart Images

Figure CN115100508B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser ranging technology, and in particular to a laser repositioning method, device, equipment and storage medium for a mobile robot. Background Art
[0002] SLAM (Simultaneous Localization and Mapping) is a technology used by robots to obtain information about their motion state and surrounding environment through the laser sensors of the mobile robot equipped with laser SLAM. It then reconstructs the surrounding environment's three-dimensional structure in real time and simultaneously locates the robot. However, during the use of the robot, "kidnapping" problems may occur due to human intervention, slipping, etc., which may cause the robot to lose its current position or have a large error in the current position. In this case, the robot needs to be relocalized. The relocalization function is an important component of robot autonomy and one of the important basic technologies for robots that do not require human supervision. Existing relocalization schemes are based on nonlinear optimization and often perform continuous scanning and matching on a global scale. After a large amount of calculation, a more likely relocalization pose is finally obtained. However, nonlinear optimization is very sensitive to initial values. Incorrect initial values or close matching scores often lead to inaccurate calculations of the final relocalization pose, resulting in relocalization failure. In addition, this brute force matching method uses the current laser frame or several adjacent laser frames to match the existing map information. This process often requires a lot of calculations and has high requirements on the computing platform's computing power. Summary of the Invention
[0003] In view of this, an embodiment of the present application provides a laser relocation method for a mobile robot, which utilizes structured information of the mobile robot's application scenario to obtain the laser relocation posture result of the mobile robot. The search complexity of the relocation initial posture can be reduced from the exponential level to the linear level, greatly optimizing the computing power consumption and calculation time during the relocation process.
[0004] In a first aspect, an embodiment of the present application provides a laser repositioning method for a mobile robot, the method comprising:
[0005] Establish a grid map based on the target environment traversed by the mobile robot;
[0006] Extracting line features of characteristic line segments in the grid map, and constructing a first line feature set based on the line features;
[0007] Acquire laser point cloud data of the current frame using a laser sensor, and construct a second line feature set based on multiple point cloud line features of the laser point cloud data;
[0008] Determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set;
[0009] Matching the first map segment and the plurality of candidate initial points determined in the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores of the plurality of candidate initial points;
[0010] An optimal initial candidate point is determined according to the matching score, and a laser relocation pose result of the mobile robot is obtained through the optimal candidate initial point.
[0011] In combination with the first aspect, an embodiment of the present application provides a first possible implementation of the first aspect, wherein extracting line features of characteristic line segments in the grid map and constructing a first line feature set based on the line features includes:
[0012] A two-dimensional laser map is obtained based on the current position of the mobile robot and the laser data of the target environment traversed by the mobile robot;
[0013] The invalid area of the two-dimensional laser map is removed to obtain a grid map.
[0014] identifying all spatial line segments from the raster map;
[0015] Comparing the length of each spatial line segment in the grid map with a preset threshold of the grid map, and determining a plurality of characteristic line segments that are greater than the preset threshold;
[0016] A first line feature set of the grid map is constructed according to the line features of the plurality of feature line segments.
[0017] In combination with the first possible implementation of the first aspect, the embodiment of the present application provides a second possible implementation of the first aspect, wherein laser point cloud data of the current frame is acquired using a laser sensor, and a second line feature set is constructed based on multiple point cloud line features of the laser point cloud data, including:
[0018] Acquiring laser point cloud data of a first preset position using a laser sensor;
[0019] Performing line segment fitting on all adjacent reflection points in the laser point cloud data of the first preset position to obtain multiple fixed line segments corresponding to various obstacles in the space of the first preset position;
[0020] comparing a preset threshold of the grid map with the length of each fixed line segment at the first preset position to determine a first selected line segment group having a length greater than the preset threshold;
[0021] A second line feature set of the laser point cloud data is constructed based on the point cloud line feature of each selected line segment in the first selected line segment group.
[0022] In combination with the first possible implementation manner or the second possible implementation manner of the first aspect, an embodiment of the present application provides a third possible implementation manner of the first aspect, wherein, based on the point cloud line features of each selected line segment in the first selected line segment group, a second line feature set of laser point cloud data is constructed, further comprising:
[0023] When the number of selected line segments of the first selected line segment group does not meet the extraction number, using a laser sensor to acquire laser point cloud data of a second preset position;
[0024] Performing line segment fitting on all adjacent reflection points in the laser point cloud data of the second preset position to obtain multiple fixed line segments corresponding to various obstacles in the space of the second preset position;
[0025] comparing a preset threshold value of the grid map with the length value of each fixed line segment at the second preset position to determine a second selected line segment group having a length value greater than the preset threshold value;
[0026] A second line feature set of the laser point cloud data is constructed according to the point cloud line features of each selected line segment in the first selected line segment group and the second selected line segment group.
[0027] In combination with the first possible implementation manner or the second possible implementation manner of the first aspect, an embodiment of the present application provides a fourth possible implementation manner of the first aspect, wherein, determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, the second point cloud segment in the second line feature set and the first map segment in the first line feature set includes:
[0028] For the longest first point cloud line segment in the second line feature set, selecting the second longest second point cloud line segment from the second line feature set;
[0029] Calculating an actual distance and an attitude angle between the first point cloud segment and the second point cloud segment, and using the calculated actual distance and attitude angle as the relative positional relationship between the two point cloud segments, wherein the attitude angles include a pitch angle, a roll angle, and a heading angle;
[0030] A first map line segment having a consistent relative position relationship and orientation with the first point cloud line segment and / or the second point cloud line segment is searched from the first line feature set.
[0031] In combination with the first possible implementation or the second possible implementation of the first aspect, an embodiment of the present application provides a fifth possible implementation of the first aspect, wherein matching the first map segment and the plurality of candidate initial points determined in the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores for the plurality of candidate initial points includes:
[0032] Comparing the length and attitude angle of the first point cloud segment or the second point cloud segment with the length and attitude angle of a first map segment selected from the first line feature set one by one, and obtaining a plurality of candidate initial points in the selected first map segment according to the comparison results being within a position error range;
[0033] A linear matching is performed on a number of candidate initial points in the selected first map segment using a nonlinear optimization algorithm to obtain matching scores of the number of candidate initial points.
[0034] In combination with the first possible implementation manner or the second possible implementation manner of the first aspect, an embodiment of the present application provides a sixth possible implementation manner of the first aspect, wherein determining an optimal initial candidate point according to the matching score, and obtaining a laser relocalization pose result of the mobile robot through the optimal candidate initial point includes:
[0035] Calculate the highest matching score through nonlinear optimization algorithm and use the highest matching score as the optimal initial candidate point;
[0036] The laser relocation pose result of the mobile robot is determined according to the position coordinates and attitude angle corresponding to the optimal initial candidate point.
[0037] In a second aspect, an embodiment of the present application further provides a laser repositioning device for a mobile robot, the laser repositioning device comprising:
[0038] Establish a map module for establishing a grid map based on the target environment traversed by the mobile robot;
[0039] a first extraction module, configured to extract line features of characteristic line segments in the grid map and construct a first line feature set based on the line features;
[0040] a second extraction module, configured to acquire laser point cloud data of a current frame using a laser sensor, and construct a second line feature set based on a plurality of point cloud line features of the laser point cloud data;
[0041] a determination module, configured to determine, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set;
[0042] a matching module, configured to match the first map segment and the plurality of candidate initial points determined in the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores of the plurality of candidate initial points;
[0043] A repositioning module is used to determine an optimal initial candidate point according to the matching score, and obtain a laser repositioning pose result of the mobile robot through the optimal candidate initial point.
[0044] In a third aspect, an embodiment of the present application further provides a mobile robot device, comprising a memory and a processor, wherein the memory is communicatively connected to the processor, the memory stores a number of computer programs executable by the processor, and the processor can implement the method described in any one of the above claims when executing the computer program.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, a laser repositioning method for a mobile robot is executed.
[0046] A laser relocation method for a mobile robot provided in an embodiment of the present application, compared with the prior art that implements laser SLAM relocation based on a brute force matching method, the present application optimizes the number of iterations in the laser SLAM relocation process through structured information in the target environment, can reduce the number of iterations from an exponential level to a linear level, can greatly improve the calculation speed in the relocation process, and saves calculation time; specifically, the method constructs a first line feature set based on the structured feature line segments of the target environment according to the mobile robot equipped with laser SLAM; uses a laser sensor to obtain laser point cloud data of the current frame, and constructs a second line feature set based on multiple point cloud line features of the laser point cloud data; determines the second point cloud line segment in the second line feature set and the first map line segment in the first line feature set based on the attribute characteristics of the first point cloud line segment in the second line feature set; matches several candidate initial points determined in the first map line segment and the second point cloud line segment through a nonlinear optimization algorithm to obtain matching scores of the several candidate initial points; determines the optimal initial candidate point based on the matching score, and obtains the laser relocation posture result of the mobile robot through the optimal candidate initial point. The above scheme enables the mobile robot to use the structured feature line segments in the target environment space to construct the first line feature set of the raster map and the second line feature set of the laser point cloud data. By determining the line features of all line segments in the two line feature sets, the initial posture of the mobile robot in the relocalization process is determined, which greatly optimizes the number of iterations in the laser SLAM relocalization process, and can reduce the number of iterations from the exponential level to the linear level, thereby improving the calculation speed of the relocalization process, saving calculation time and reducing computing power consumption.
[0047] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0049] Figure 1 A flow chart of a laser repositioning method for a mobile robot provided in an embodiment of the present application is shown.
[0050] Figure 2 A schematic diagram of the process of constructing a first line feature set of a grid map in a laser relocation method for a mobile robot provided in an embodiment of the present application is shown.
[0051] Figure 3 A schematic diagram of the process of constructing a second line feature set of laser point cloud data in a laser repositioning method for a mobile robot provided in an embodiment of the present application is shown.
[0052] Figure 4 A schematic diagram of a process for determining a laser repositioning result of a mobile robot in a laser repositioning method of a mobile robot provided in an embodiment of the present application is shown.
[0053] Figure 5 A schematic structural diagram of a laser repositioning device for a mobile robot provided in an embodiment of the present application is shown.
[0054] Figure 6 A structural schematic diagram of a mobile robot device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0056] Considering that most of the existing laser relocalization solutions are based on brute force search, the existing map needs to be globally traversed during the relocalization process, and the best posture in the global result is taken as the initial posture for relocalization. This method requires a lot of calculations and will produce large errors in large scenes or when the computing platform has low computing power, so the relocalization cannot be completed. Based on this, the embodiment of the present application provides a laser relocalization method for a mobile robot, which is described below through an embodiment.
[0057] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.
[0058] Figure 1 FIG. 1 is a flow chart of a laser repositioning method for a mobile robot provided in an embodiment of the present application; FIG. Figure 1 As shown, the specific steps include:
[0059] Step S10: establishing a grid map based on the target environment traversed by the mobile robot.
[0060] During the specific implementation of step S10, the mobile robot's own laser sensor is used to collect the surrounding environment information of the target environment. The value of the straight line formed from the laser starting point to the laser data point is calculated according to the binary Bayesian calculation method. The laser line is then traversed through the line iterator to form the value of the straight line, and the coordinate system of the mobile robot's current position is converted into a position in the grid, thus obtaining a two-dimensional laser map. The invalid areas of the two-dimensional laser map are removed to obtain a grid map.
[0061] Step S20: extracting line features of characteristic line segments in the grid map, and constructing a first line feature set based on the line features.
[0062] In the specific implementation of step S20, all spatial line segments with a grid pixel value of 100 are extracted from the grid map, and the length value of each spatial line segment in the grid map is compared according to a preset threshold of the grid map to obtain a length comparison result of each spatial line segment. According to the length comparison result of each spatial line segment, multiple feature line segments greater than the preset threshold are determined. The attribute information of the above-mentioned feature line segments includes length, midpoint coordinates, and angle, wherein the length is the distance from the starting point to the ending point of the feature line segment, the midpoint coordinates are the position coordinates of the center point of the feature line segment, and the angle is the structural information of the feature line segment in the approximately horizontal and approximately vertical states, that is, the feature line segments with an angle selection range of -5≤angle≤5 or 85≤angle≤95 are sorted from large to small according to the length of each feature line segment, and the line features of each feature line segment are extracted. The line features of each feature line segment are added to the three threads of the corresponding laser sensing model, and the first line feature set of the grid map is constructed according to the common view relationship of the laser sensing model.
[0063] Step S30: using a laser sensor to acquire laser point cloud data of the current frame, and constructing a second line feature set based on multiple point cloud line features of the laser point cloud data.
[0064] During the specific implementation of step S30, the mobile robot selects a first preset position in the target environment, uses a laser sensor to obtain laser point cloud data of reflection points between the current laser starting point and each obstacle in the target environment, performs line segment fitting on all adjacent reflection points in the laser point cloud data, and obtains multiple fixed line segments corresponding to each obstacle in the space at the first preset position. The preset threshold of the grid map is compared with the length values of the multiple fixed line segments in the first preset position to determine a first selected line segment group whose length value is greater than the preset threshold. The first selected line segment group contains multiple selected line segments, which are sorted from large to small according to the length of each selected line segment in the first selected line segment group, and the point cloud line features of each selected line segment are extracted. The point cloud line features of each selected line segment are added to the three threads of the corresponding laser sensing model, and a second line feature set of the laser point cloud data is constructed according to the common view relationship of the laser sensing model.
[0065] Step S40 : determining the second point cloud segment in the second line feature set and the first map segment in the first line feature set according to the attribute feature of the first point cloud segment in the second line feature set.
[0066] During the specific implementation of step S40, based on the length attribute feature of the first point cloud line segment in the second line feature set, a second point cloud line segment with a length similar to that of the first point cloud line segment is selected from the second line feature set, and then the actual distance and attitude angle between the two point cloud line segments are calculated based on the length, midpoint coordinates and angle of the longest first point cloud line segment and the length, midpoint coordinates and angle of the second longest second point cloud line segment, and it is determined whether the actual distance between the two point cloud line segments is less than a preset threshold. If so, the calculated actual distance and attitude angle are used as the relative position relationship of the two point cloud line segments. Based on the calculated relative position relationship of the two point cloud line segments, a first map line segment with the same orientation as the relative position relationship of the first point cloud line segment or the second point cloud line segment in the second line feature set is searched from the first line feature set.
[0067] Step S50 : Matching the candidate initial points determined in the first map segment and the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores of the candidate initial points.
[0068] During the specific implementation of step S50, all map line segments in the first line feature set are sorted from largest to smallest according to length, and a first map line segment is selected according to the lengths of all map line segments in the first line feature set from largest to smallest. The length and attitude angle of any one of the first point cloud line segment or the second point cloud line segment in the second line feature set are compared one by one with the length and attitude angle of the first map line segment selected from the first line feature set to obtain a number of candidate initial points of all selected first map line segments in the first line feature set. The length and attitude angle of the first point cloud line segment or the second point cloud line segment are linearly matched with the lengths and attitude angles of all selected first map line segments in the first line feature set using a nonlinear least squares method or a secondary gradient method included in the nonlinear optimization algorithm to obtain matching scores for the number of candidate initial points.
[0069] Step S60: determining an optimal initial candidate point according to the matching score, and obtaining a laser relocalization pose result of the mobile robot through the optimal candidate initial point.
[0070] During the specific implementation of step S60, the laser relocation pose result of the mobile robot is calculated by a nonlinear least squares method or a secondary gradient method, the length and attitude angle of the first point cloud segment or the second point cloud segment are used as initial values, and the variable values corresponding to the lengths and attitude angles of all selected first map segments in the first line feature set are linearized and iteratively calculated. After multiple linearization iterations, the minimum value of the descent increment is obtained as the optimal value of the matching score, and the optimal candidate point of the selected first map segment is determined according to the optimal matching value, and the length and attitude angle contained in the optimal candidate initial point are used as the laser relocation pose result of the mobile robot.
[0071] In one possible implementation, Figure 2 A schematic diagram of the process of constructing a first line feature set of a grid map in a laser relocalization method for a mobile robot provided in an embodiment of the present application is shown; specifically, the process includes:
[0072] Step S101 , obtaining a two-dimensional laser map based on the current position of the mobile robot and the laser data of the mobile robot traversing the target environment.
[0073] Step S102 : removing invalid areas of the two-dimensional laser map to obtain a grid map.
[0074] Step S103: Identify all spatial line segments from the grid map.
[0075] Step S104 : comparing the preset threshold of the grid map with the length of each spatial line segment in the grid map to determine a plurality of characteristic line segments that are greater than the preset threshold.
[0076] Step S105 : constructing a first line feature set of the grid map according to the line features of the plurality of feature line segments.
[0077] In the specific implementation of steps S101, S102, S103, S104, and S105, a two-dimensional laser map is generated based on the coordinate system of the current position of the mobile robot and the laser data of the target environment collected by the mobile robot through its own laser sensor. The invalid areas of the two-dimensional laser map are removed to obtain a grid map. Different pixel values are stored in each grid in the above grid map, representing different meanings of each grid. Here, the invalid area in the grid map is gray and the stored pixel value is -1. The wall area in the grid map is stored as white and the stored pixel value is 0. All spatial line segments with a grid pixel value of 100 are identified from the grid map. The length value of each spatial line segment in the grid map is compared with the preset threshold of the grid map to obtain a length comparison result of each spatial line segment. Based on the length comparison result of each spatial line segment, multiple feature line segments greater than the preset threshold are determined and sorted from large to small according to the length of each feature line segment. The line feature of each feature line segment is extracted according to the tracking thread of the laser sensing model, and the line feature of each feature line segment is added to the local The update is performed in the mapping thread, and then the number of key frames of the line features of each feature segment is compared with the number of reference key frames through the loop Closing thread. If the number of points is greater than 30, the first line feature set of the raster map is constructed.
[0078] In one possible implementation, Figure 3 A schematic diagram of the process of constructing a second line feature set of laser point cloud data in a laser repositioning method for a mobile robot provided in an embodiment of the present application is shown; specifically, the process includes:
[0079] Step S201: Acquire laser point cloud data of a first preset position using a laser sensor.
[0080] Step S202 : performing line segment fitting on all adjacent reflection points in the laser point cloud data of the first preset position to obtain a plurality of fixed line segments corresponding to various obstacles in the space of the first preset position.
[0081] Step S203 : comparing the length of each fixed line segment at the first preset position with the preset threshold of the grid map to determine a first selected line segment group whose length is greater than the preset threshold.
[0082] Step S204 : When the number of selected line segments of the first selected line segment group does not meet the extraction number, the laser point cloud data of the second preset position is acquired by using a laser sensor.
[0083] Step S205: performing line segment fitting on all adjacent reflection points in the laser point cloud data of the second preset position to obtain multiple fixed line segments corresponding to various obstacles in the space of the second preset position;
[0084] Step S206 , comparing the length of each fixed line segment at the second preset position with the preset threshold of the grid map to determine a second selected line segment group whose length is greater than the preset threshold;
[0085] Step S207 : constructing a second line feature set of the laser point cloud data according to the point cloud line features of each selected line segment in the first selected line segment group and the second selected line segment group.
[0086] In the specific implementation, steps S201, S202, S203, S204, S205, S206, and S207 are as follows: the mobile robot selects a first preset position in the target environment, uses a laser sensor to obtain laser point cloud data of reflection points between the current laser starting point and each obstacle in the target environment, performs line segment fitting on all adjacent reflection points in the laser point cloud data, obtains multiple fixed line segments corresponding to each obstacle in the space at the first preset position, compares the length values of the multiple fixed line segments in the first preset position with the preset threshold value of the grid map, and determines the first fixed line segment having a length value greater than the preset threshold value. Select a line segment group; when the number of selected line segments in the first selected line segment group does not meet the extraction number n, the mobile robot selects the second preset position again, uses the laser sensor to obtain the laser point cloud data of the reflection points between the current laser starting point and the obstacles in the indoor space environment, performs line segment fitting on all adjacent reflection points in the laser point cloud data, and obtains multiple fixed line segments corresponding to the obstacles in the space at the second preset position. According to the preset threshold of the grid map, the length values of the multiple fixed line segments in the second preset position are compared to determine the second selected line segment group whose length value is greater than the preset threshold, and the first selected line segment group is selected. The lengths of each selected line segment and each selected line segment in the second selected line segment group are sorted from large to small, and the point cloud line features of each selected line segment are extracted. The point cloud line features of each selected line segment are added to the three threads of the corresponding laser sensing model. According to the common view relationship of the laser sensing model, the second line feature set of the laser point cloud data is constructed; here, when the number of line segments in the first selected line segment group and the second selected group at the first preset position still does not meet the extraction number n, the mobile robot selects the third preset position again, and uses the laser sensor to obtain the reflection points between the current laser starting point and the obstacles in the indoor space environment. Laser point cloud data is obtained, and line segment fitting is performed on all adjacent reflection points in the laser point cloud data to obtain multiple fixed line segments corresponding to each obstacle in the space at the third preset position. The length values of the multiple fixed line segments in the third preset position are compared with the preset threshold of the grid map to determine a third selected line segment group with a length value greater than the preset threshold. The third selected line segment group is cyclically selected in sequence until the extraction quantity n is met. The line features of each selected line segment are sorted from large to small according to the length of each feature line segment. The tracking thread of the laser sensing model is used to extract the line features of each selected line segment. The line features of each feature line segment are added to the local mapping thread for updating. The key frame of the line feature of each feature line segment is compared with the number of reference key frames through the loop closing thread. If the number of points is greater than 50, a second line feature set of the laser point cloud data is constructed.
[0087] In one possible implementation, Figure 4 A schematic diagram of a process for determining a laser ranging relocation result of a mobile robot in a laser relocation method of a mobile robot provided in an embodiment of the present application is shown; specifically, the process includes:
[0088] Step S301 : for the longest first point cloud line segment in the second line feature set, select the second longest second point cloud line segment from the second line feature set.
[0089] Step S302 , calculating the actual distance and attitude angle between the first point cloud segment and the second point cloud segment, and using the calculated actual distance and attitude angle as the relative position relationship between the two point cloud segments, where the attitude angles include: pitch angle, roll angle, and heading angle.
[0090] Step S303: searching the first line feature set for a first map line segment having a consistent relative position relationship and orientation with the first point cloud line segment and / or the second point cloud line segment.
[0091] In step S304, the length and attitude angle of the first point cloud segment or the second point cloud segment are compared one by one with the length and attitude angle of the first map segment selected from the first line feature set, and the comparison results are within the position error range, thereby obtaining several candidate initial points in the selected first map segment.
[0092] Step S305 : performing linear matching on a number of candidate initial points in the selected first map segment using a nonlinear optimization algorithm to obtain matching scores of the candidate initial points.
[0093] Step S306: Calculate the highest matching score using a nonlinear optimization algorithm, and use the highest matching score as the optimal initial candidate point.
[0094] Step S307: determining the laser relocation pose result of the mobile robot according to the position coordinates and pose angle corresponding to the optimal initial candidate point.
[0095] Steps S301, S302, S303, S304, S305, S306, and S307 are specifically implemented. According to the length attribute feature of the first point cloud line segment in the second line feature set, a second point cloud line segment with a length similar to that of the first point cloud line segment is selected from the second line feature set. Then, according to the length, midpoint coordinates, and angle of the longest first point cloud line segment and the length, midpoint coordinates, and angle of the second longest second point cloud line segment, the actual distance and attitude angle between the two point cloud line segments are calculated to determine the actual distance between the two point cloud line segments. Is the actual distance less than a preset threshold? If so, the calculated actual distance and attitude angle are used as the relative position relationship of the two point cloud segments. According to the calculated relative position relationship of the two point cloud segments, a first map segment with the same orientation as the first point cloud segment or the second point cloud segment in the second line feature set is searched from the first line feature set; all map segments in the first line feature set are sorted from large to small according to length, and the first map segment is selected according to the length of all map segments in the first line feature set from large to small. The length and attitude angle of any one of the first point cloud line segments or the second point cloud line segments in the second line feature set are compared one by one with the length and attitude angle of the first map line segments selected from the first line feature set to obtain a number of candidate initial points of all the selected first map line segments in the first line feature set. The length and attitude angle of the first point cloud line segment or the second point cloud line segment are used as initial values, and linear matching is performed on the variable values corresponding to the length and attitude angle of all the selected first map line segments in the first line feature set to obtain matching scores of the candidate initial points in the selected first map line segments. The length and attitude angle of all the selected first map line segments in the first line feature set are linearized and iteratively calculated based on the length and attitude angle of the first point cloud line segment or the second point cloud line segment using a nonlinear least squares method or a secondary gradient method. After multiple linearization iterations, the minimum descent increment value is obtained as the optimal matching score value. The optimal candidate point of the selected first map line segment is determined based on the optimal matching value, and the length and attitude angle contained in the optimal candidate initial point is used as the laser relocalization pose result of the mobile robot.
[0096] Figure 5 FIG. 1 shows a schematic structural diagram of a laser repositioning device for a mobile robot provided in an embodiment of the present application. Figure 5 As shown, the laser repositioning device comprises:
[0097] A map creation module 401 is used to create a grid map according to the target environment traversed by the mobile robot;
[0098] A first extraction module 402 is configured to extract line features of characteristic line segments in the grid map and construct a first line feature set based on the line features;
[0099] A second extraction module 403 is configured to acquire laser point cloud data of a current frame using a laser sensor, and construct a second line feature set based on a plurality of point cloud line features of the laser point cloud data;
[0100] a determination module 404 for determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set;
[0101] A matching module 405 is configured to match the first map segment with the plurality of candidate initial points determined in the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores for the plurality of candidate initial points;
[0102] The relocalization module 406 is configured to determine an optimal initial candidate point according to the matching score, and obtain a laser relocalization pose result of the mobile robot through the optimal candidate initial point.
[0103] Corresponding to Figure 1 The laser repositioning method of the mobile robot in the embodiment of the present application further provides a mobile robot device 50, Figure 6 ,like Figure 6 As shown, the device includes a memory 501, a processor 502, and a computer program stored in the memory 501 and executable on the processor 502, wherein the processor 502 implements the above method when executing the above computer program.
[0104] Establish a grid map based on the target environment traversed by the mobile robot;
[0105] Extracting line features of characteristic line segments in the raster map, and constructing a first line feature set based on the line features;
[0106] Acquire laser point cloud data of the current frame using a laser sensor, and construct a second line feature set based on multiple point cloud line features of the laser point cloud data;
[0107] Determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set;
[0108] Matching the first map line segment and the plurality of candidate initial points determined in the second point cloud line segment using a nonlinear optimization algorithm to obtain matching scores of the plurality of candidate initial points;
[0109] The optimal initial candidate point is determined according to the matching score, and the laser relocalization pose result of the mobile robot is obtained through the optimal candidate initial point.
[0110] Corresponding to Figure 1The embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to perform the following steps:
[0111] Establish a grid map based on the target environment traversed by the mobile robot;
[0112] Extracting line features of characteristic line segments in the raster map, and constructing a first line feature set based on the line features;
[0113] Acquire laser point cloud data of the current frame using a laser sensor, and construct a second line feature set based on multiple point cloud line features of the laser point cloud data;
[0114] Determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set;
[0115] Matching the first map line segment and the plurality of candidate initial points determined in the second point cloud line segment using a nonlinear optimization algorithm to obtain matching scores of the plurality of candidate initial points;
[0116] The optimal initial candidate point is determined according to the matching score, and the laser relocalization pose result of the mobile robot is obtained through the optimal candidate initial point.
[0117] Based on the above analysis, it can be seen that compared with the related technology that uses brute force matching to implement the laser SLAM repositioning solution, the embodiment of the present application provides a method that uses a mobile robot to utilize structured information in the environmental space to construct a first line feature set of the raster map and a second line feature set of the laser point cloud data. By determining the line features of all line segments in the two line feature sets, the initial posture of the mobile robot in the repositioning process is determined, which greatly optimizes the number of iterations in the laser SLAM repositioning process, and can reduce the number of iterations from the exponential level to the linear level, thereby improving the calculation speed of the repositioning process, saving calculation time and reducing computing power consumption.
[0118] The laser ranging repositioning device provided in the embodiments of the present application can be specific hardware on the device or software or firmware installed on the device. Its implementation principle and technical effects are the same as those of the aforementioned method embodiments. For the sake of brief description, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiments. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the devices and units described above can all refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0119] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0120] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0121] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0122] If the function is implemented in the form of 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 application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0123] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0124] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or make equivalent replacements for some of the technical features thereof. However, these modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A laser repositioning method for a mobile robot, characterized in that: The method comprises: Establish a grid map based on the target environment traversed by the mobile robot; Extracting line features of characteristic line segments in the grid map, and constructing a first line feature set based on the line features; Acquire laser point cloud data of the current frame using a laser sensor, and construct a second line feature set based on multiple point cloud line features of the laser point cloud data; Determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set; Matching the first map segment and the plurality of candidate initial points determined in the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores of the plurality of candidate initial points; Determine an optimal initial candidate point according to the matching score, and obtain a laser relocalization pose result of the mobile robot through the optimal initial candidate point; Determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set, includes: For the longest first point cloud line segment in the second line feature set, selecting the second longest second point cloud line segment from the second line feature set; Calculating an actual distance and an attitude angle between the first point cloud segment and the second point cloud segment, and using the calculated actual distance and attitude angle as the relative positional relationship between the two point cloud segments, wherein the attitude angles include a pitch angle, a roll angle, and a heading angle; A first map line segment having a consistent relative position relationship and orientation with the first point cloud line segment and / or the second point cloud line segment is searched from the first line feature set.
2. The method according to claim 1, characterized in that Extracting line features of characteristic line segments in the grid map and constructing a first line feature set based on the line features, including: A two-dimensional laser map is obtained based on the current position of the mobile robot and the laser data of the target environment traversed by the mobile robot; removing invalid areas of the two-dimensional laser map to obtain a grid map; identifying all spatial line segments from the raster map; Comparing the length of each spatial line segment in the grid map with a preset threshold of the grid map, and determining a plurality of characteristic line segments that are greater than the preset threshold; A first line feature set of the grid map is constructed according to the line features of the plurality of feature line segments.
3. The method according to claim 1, characterized in that The laser point cloud data of the current frame is acquired by using a laser sensor, and a second line feature set is constructed according to a plurality of point cloud line features of the laser point cloud data, including: Acquiring laser point cloud data of a first preset position using a laser sensor; Performing line segment fitting on all adjacent reflection points in the laser point cloud data of the first preset position to obtain multiple fixed line segments corresponding to various obstacles in the space of the first preset position; comparing a preset threshold of the grid map with the length of each fixed line segment at the first preset position to determine a first selected line segment group having a length greater than the preset threshold; A second line feature set of the laser point cloud data is constructed based on the point cloud line feature of each selected line segment in the first selected line segment group.
4. The method according to claim 3, characterized in that Constructing a second line feature set of laser point cloud data based on the point cloud line feature of each selected line segment in the first selected line segment group, further comprising: When the number of selected line segments of the first selected line segment group does not meet the extraction number, using a laser sensor to acquire laser point cloud data of a second preset position; Performing line segment fitting on all adjacent reflection points in the laser point cloud data of the second preset position to obtain multiple fixed line segments corresponding to various obstacles in the space of the second preset position; comparing a preset threshold value of the grid map with the length value of each fixed line segment at the second preset position to determine a second selected line segment group having a length value greater than the preset threshold value; A second line feature set of the laser point cloud data is constructed according to the point cloud line features of each selected line segment in the first selected line segment group and the second selected line segment group.
5. The method according to claim 1, characterized in that Matching the first map segment and the plurality of candidate initial points determined in the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores of the plurality of candidate initial points includes: Comparing the length and attitude angle of the first point cloud segment or the second point cloud segment with the length and attitude angle of a first map segment selected from the first line feature set one by one, and obtaining a plurality of candidate initial points in the selected first map segment according to the comparison results being within a position error range; A linear matching is performed on a number of candidate initial points in the selected first map segment using a nonlinear optimization algorithm to obtain matching scores of the number of candidate initial points.
6. The method according to claim 1, wherein Determining an optimal initial candidate point according to the matching score, and obtaining a laser relocalization pose result of the mobile robot through the optimal initial candidate point, including: Calculate the highest matching score through nonlinear optimization algorithm and use the highest matching score as the optimal initial candidate point; The laser relocation pose result of the mobile robot is determined according to the position coordinates and attitude angle corresponding to the optimal initial candidate point.
7. A laser repositioning device for a mobile robot, characterized in that: The laser repositioning device comprises: Establish a map module for establishing a grid map based on the target environment traversed by the mobile robot; a first extraction module, configured to extract line features of characteristic line segments in the grid map and construct a first line feature set based on the line features; a second extraction module, configured to acquire laser point cloud data of a current frame using a laser sensor, and construct a second line feature set based on a plurality of point cloud line features of the laser point cloud data; a determination module, configured to determine, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set; a matching module, configured to match the first map segment and the plurality of candidate initial points determined in the second point cloud segment using a nonlinear optimization algorithm to obtain matching scores of the plurality of candidate initial points; a relocalization module, configured to determine an optimal initial candidate point according to the matching score, and obtain a laser relocalization pose result of the mobile robot through the optimal initial candidate point; Determining, based on the attribute characteristics of the first point cloud segment in the second line feature set, a second point cloud segment in the second line feature set and a first map segment in the first line feature set, includes: For the longest first point cloud line segment in the second line feature set, selecting the second longest second point cloud line segment from the second line feature set; Calculating an actual distance and an attitude angle between the first point cloud segment and the second point cloud segment, and using the calculated actual distance and attitude angle as the relative positional relationship between the two point cloud segments, wherein the attitude angles include a pitch angle, a roll angle, and a heading angle; A first map line segment having a consistent relative position relationship and orientation with the first point cloud line segment and / or the second point cloud line segment is searched from the first line feature set.
8. A mobile robot device, characterized in that: The invention comprises a memory and a processor, wherein the memory is communicatively connected to the processor, the memory stores a plurality of computer programs executable by the processor, and the processor can implement the method described in any one of claims 1 to 6 when executing the computer programs.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
Repositioning method and device of mobile equipment
CN113776533A