Robot and mapping method and device thereof
By using pre-stored keyframe library and point cloud matching technology in robot mapping construction, the target keyframes are determined and the map is improved, the problem of starting over when the map construction is interrupted or expanded in the existing technology is solved, and the robot mapping construction is improved efficiency.
Patent Information
- Application Number
- CN202011424296.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-12-08
AI Technical Summary
In the prior art, when a robot encounters abnormal situations during the drawing construction process or needs to expand the drawing construction, it needs to start over, resulting in low efficiency in drawing construction.
By obtaining the initial value position of the robot, searching and matching the keyframes in the pre-stored keyframe library, determining the target keyframe of the current frame, and improving the built map based on the target keyframes to achieve incremental map construction.
There is no need to complete the map construction at one time, and the completed map can be effectively incrementally constructed, improving the efficiency of robot map construction.
Smart Images

Figure CN112595323B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of robots, and in particular, relates to a robot and a mapping method and device thereof. Background Art
[0002] With the advancement of technology, commercial service robots are becoming more and more popular. In addition, the cost of multi-line lidar sensors that perceive the external environment is gradually decreasing. More and more multi-line lidar sensors are appearing in commercial service robot configurations. Therefore, the robot's simultaneous localization and mapping (SLAM) technology has also made rapid progress and development.
[0003] At present, when building a map using SLAM technology, it usually needs to be completed in one go. If the robot encounters an abnormal situation and stops during the mapping process, or if it needs to expand the mapping later, it needs to start the mapping from the beginning, which is not conducive to improving the efficiency of robot mapping. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a robot and a mapping method and device thereof to solve the problem in the prior art that robot mapping needs to be completed in one go. If it is interrupted, it needs to start mapping again from the beginning, which is not conducive to improving the robot's mapping efficiency.
[0005] A first aspect of an embodiment of the present application provides a robot mapping method, the method comprising:
[0006] Get the initial position of the robot;
[0007] According to the initial position of the robot, searching for a first predetermined number of key frames in a pre-stored key frame library, and determining reference point clouds corresponding to the searched key frames;
[0008] Matching the feature point cloud corresponding to the current frame acquired by the robot with the reference point cloud to determine the target key frame corresponding to the current frame;
[0009] According to the target key frame corresponding to the current frame, the built map corresponding to the pre-stored key frame library is improved.
[0010] In combination with the first aspect, in a first possible implementation manner of the first aspect, searching for a first predetermined number of key frames in a pre-stored key frame library according to the initial position of the robot includes:
[0011] Obtaining the distance between the pre-stored key frame and the initial value position;
[0012] A key frame sequence is obtained by sorting according to the distances, and a first predetermined number of key frames with smaller distances in the sequence are selected.
[0013] In combination with the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, determining the reference point cloud corresponding to the searched key frame includes:
[0014] In the key frame sequence, taking the i-th key frame as the center, 2w+1 key frames are intercepted in the key frame sequence with a length of a second predetermined number w, wherein i is a positive integer less than the first predetermined number, and w is an integer greater than or equal to 0;
[0015] The reference point cloud of the i-th key frame is constructed according to the intercepted point clouds of the 2w+1 key frames.
[0016] In combination with the first aspect, in a third possible implementation manner of the first aspect, matching a feature point cloud corresponding to a current frame acquired by the robot with the reference point cloud to determine a target key frame corresponding to the current frame includes:
[0017] Determine the posture transformation matrix corresponding to the current frame of the robot;
[0018] According to the posture transformation matrix, the feature point cloud corresponding to the current frame is transformed into a point cloud to be registered;
[0019] Matching the point cloud to be registered with the reference point cloud corresponding to each key frame to determine the matching degree between the current frame and each key frame;
[0020] The key frame with the best match is selected as the target key frame corresponding to the current frame.
[0021] In combination with the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, before selecting the key frame with the best matching degree as the target key frame corresponding to the current frame, the method further includes:
[0022] Compare the matching degree of the key frame with the best matching degree with a preset matching degree threshold;
[0023] If the matching degree of the key frame with the best matching degree is greater than or equal to a preset matching degree threshold, the key frame with the best matching degree is selected as the target key frame corresponding to the current frame;
[0024] If the matching degree of the key frame with the best matching degree is less than a preset matching degree threshold, the initial value position is re-determined.
[0025] In combination with the third possible implementation method of the first aspect, in the fifth possible implementation method of the first aspect, the matching degree between the current frame and each key frame is the minimum mean square error between the point cloud to be registered corresponding to the current frame and the reference point cloud corresponding to each key frame.
[0026] In combination with the first aspect, in a sixth possible implementation manner of the first aspect, according to the target key frame corresponding to the current frame, the built map corresponding to the pre-stored key frame library is improved, including:
[0027] Determine the fourth pose transformation matrix of the odometer coordinate system at the current moment before correction based on the second pose transformation matrix of the odometer coordinate system of the target key frame in the map coordinate system, the first pose transformation matrix of the lidar coordinates at the current moment in the map coordinate system, and the third pose transformation matrix of the lidar coordinates at the current moment in the odometer coordinate system before correction;
[0028] Determine a fifth posture transformation matrix of the current laser radar coordinate system relative to the corrected odometer coordinate system according to the third posture transformation matrix and the fourth posture transformation matrix;
[0029] According to the position of the target frame corresponding to the current frame in the map coordinate system and the first pose transformation matrix, the built map is improved.
[0030] A second aspect of an embodiment of the present application provides a robot mapping device, the device comprising:
[0031] An initial position acquisition unit, used to acquire the initial position of the robot;
[0032] A reference point cloud determination unit, configured to search for a first predetermined number of key frames in a pre-stored key frame library according to the initial position of the robot, and determine reference point clouds corresponding to the searched key frames;
[0033] A target key frame matching unit, used to match the feature point cloud corresponding to the current frame acquired by the robot with the reference point cloud to determine the target key frame corresponding to the current frame;
[0034] The map improvement unit is used to improve the built map corresponding to the pre-stored key frame library according to the target key frame corresponding to the current frame.
[0035] A third aspect of an embodiment of the present application provides a robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.
[0036] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0037] Compared with the prior art, the embodiment of the present application has the following beneficial effects: the embodiment of the present application stores the pre-acquired key frames in a key frame library, and when it is necessary to incrementally build the robot map, a predetermined number of key frames are searched according to the determined initial position of the robot, and the target key frames corresponding to the current frame collected by the robot are determined by point cloud matching, and the built map corresponding to the key frame library is improved according to the determined target key frames. As a result, when the robot performs simultaneous positioning and mapping, it does not need to be completed in one go, and it does not need to start from scratch to effectively incrementally build the completed map, thereby improving the efficiency of robot mapping. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0039] Figure 1 It is a schematic diagram of the implementation process of a robot mapping method provided in an embodiment of the present application;
[0040] Figure 2 It is a schematic diagram of an implementation flow of a reference point cloud determination method provided in an embodiment of the present application;
[0041] Figure 3 It is a schematic diagram of an implementation flow of a target key frame selection method provided in an embodiment of the present application;
[0042] Figure 4 is a schematic diagram of a robot mapping device provided in an embodiment of the present application;
[0043] Figure 5 It is a schematic diagram of the robot provided in the embodiment of the present application. DETAILED DESCRIPTION
[0044] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0045] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0046] At present, for the robot's simultaneous positioning and mapping operations, it is usually necessary to complete the map construction in the scene at one time. After completing the map construction in the scene, a map including sufficient static environment information can be obtained. However, if there is an interruption in the map construction process, such as an abnormal shutdown of the robot during the construction process. When restarting, the robot's posture changes, and the robot needs to start map construction from scratch. Or, when the map needs to be further expanded or partially updated, it is necessary to start map construction from scratch, which is not conducive to improving the efficiency of robot map construction.
[0047] Based on this problem, this application proposes a robot mapping method, such as Figure 1 As shown, the method includes:
[0048] In S101, the initial position of the robot is obtained.
[0049] Specifically, the initial position in the embodiment of the present application refers to the estimated initial position of the robot at the current moment when the robot is performing incremental mapping on the map.
[0050] The actual position may be a user's designated position in the map received by the robot. For example, the user's designated position on the map may be received as Pi. In order to improve the accuracy of the robot's incremental mapping, the distance between the robot's designated position Pi and the robot's actual position Pt needs to be less than a preset distance threshold T.
[0051] In a possible implementation, the initial position of the robot may also be the position of the robot determined by a positioning module of the robot. The positioning module may include but is not limited to base station positioning and the like.
[0052] In S102, according to the initial position of the robot, a first predetermined number of key frames are searched in a pre-stored key frame library, and reference point clouds corresponding to the searched key frames are determined.
[0053] Since there may be a difference between the initial position of the robot and the actual position, in order to accurately obtain the key frame that matches the current position of the robot in the key frame library, the matching key frame can be found through point cloud matching. The process of point cloud matching can be as follows: Figure 2 As shown, including:
[0054] In S201, the distance between the pre-stored key frame and the initial value position is obtained.
[0055] The key frame library stores the key frame data collected before this simultaneous localization and mapping (SLAM), including the position corresponding to the key frame, the point cloud information corresponding to the key frame, the transformation matrix information corresponding to the key frame, etc. The transformation matrix information may include the transformation matrix between the laser radar coordinate system, the odometer coordinate system, the map coordinate system, etc.
[0056] According to the position information of the key frames in the pre-stored key frame library and combined with the initial position of the robot, the distance between the robot and the position points of each key frame in the key frame library can be estimated.
[0057] In S202, a key frame sequence is obtained by sorting according to the distance, and a first predetermined number of key frames with smaller distances in the sequence are selected.
[0058] According to the estimated calculated distance, a key frame sequence can be obtained by sorting according to the size of the distance. Since the key frame may match the current frame of the robot when the position point is close to the initial value position, the application selects a first predetermined number of key frames with a smaller distance to perform point cloud matching with the current frame.
[0059] Since the initial position differs from the actual position by a certain distance, the first predetermined number of key frames may be determined according to a preset distance threshold.
[0060] Of course, the method of selecting the first predetermined number of key frames is not limited to the comparison of the distances from the initial value positions, and the predetermined number of key frames may also be determined by other position range definition methods.
[0061] In S203, in the key frame sequence, 2w+1 key frames are intercepted in the key frame sequence with the i-th key frame as the center and the length of the second predetermined number w, wherein i is a positive integer less than the first predetermined number, and w is an integer greater than or equal to 0.
[0062] In S204, a reference point cloud of the i-th key frame is constructed based on the intercepted point clouds of the 2w+1 key frames.
[0063] In one implementation method of determining other key frames for matching a key frame, the key frame to be matched can be used as the center, and the second predetermined length can be used as the interception radius. 2w+1 key frames can be intercepted in the key frame sequence, and a certain number of surrounding key frames can be selected for superposition to obtain a reference point cloud, thereby improving the efficiency of the registration.
[0064] Alternatively, in a possible implementation, the reference point cloud corresponding to the key frame may be obtained by other key frame selection methods, for example, the point cloud corresponding to a single key frame may be used as the reference point cloud.
[0065] In S103, the feature point cloud corresponding to the current frame acquired by the robot is matched with the reference point cloud to determine the target key frame corresponding to the current frame.
[0066] The target key frame is the key frame in the key frame library corresponding to the current frame.
[0067] In order to compare the current frame collected by the robot at the current moment with the pre-stored key frame, it is necessary to unify the coordinates of the robot's current frame and the stored key frame. The embodiment of the present application can convert the point cloud of the current frame collected by the robot into a point cloud corresponding to the map coordinate system, that is, the point cloud to be registered, and match the reference point cloud based on the map coordinate system stored in the key frame library, thereby improving the accuracy and efficiency of the matching. The specific matching process can be as follows: Figure 3 As shown, including:
[0068] In S301, the posture transformation matrix corresponding to the current frame of the robot is determined.
[0069] According to the posture information of the robot, the posture transformation matrix corresponding to the robot when collecting the image of the current frame can be obtained, and the change information of the robot's posture can be determined through the posture transformation matrix.
[0070] In S302, the feature point cloud corresponding to the current frame is transformed into a point cloud to be registered according to the posture transformation matrix.
[0071] According to the determined robot posture transformation matrix, the feature point cloud of the current frame collected by the robot can be transformed to obtain the feature point cloud corresponding to the map coordinate system, that is, the point cloud to be registered.
[0072] In S303, the point cloud to be registered is matched with the reference point cloud corresponding to each key frame found, and the matching degree between the current frame and each key frame is determined.
[0073] When matching the point cloud to be registered with the reference point cloud corresponding to each key frame found, the mean square error between the point cloud to be registered and the reference point cloud can be calculated by the nearest neighbor iteration algorithm. The mean square error reflects the matching degree between the point cloud to be registered and the reference point cloud. The higher the matching degree between the point cloud to be registered and the reference point cloud, the smaller the mean square error value.
[0074] In S304, the key frame with the best matching degree is selected as the target key frame corresponding to the current frame.
[0075] The reference point cloud corresponding to the key frame determined by the initial value position can be matched with the point cloud to be registered one by one to obtain the key frame with the largest matching degree, that is, the key frame with the smallest mean square error, as the target key frame.
[0076] In a possible implementation of the present application, a step of comparing the best matching value with a preset matching threshold may also be included. By screening the matching threshold, it is possible to avoid the situation where the initial value position is far away from the actual position and the key frame found is not the accurate target key frame. In this case, the initial value position can be re-determined to further find the accurate target key frame. If the matching threshold is greater than or equal to the preset matching threshold, such as the mean square error is less than the preset error threshold, the key frame with the best matching degree can be used as the target key frame corresponding to the current frame.
[0077] In S104, the built map corresponding to the pre-stored key frame library is improved according to the target key frame corresponding to the current frame.
[0078] After determining the target keyframe corresponding to the current frame, the closed-loop factor can be established based on the current keyframe index and the matching historical keyframe index. This can determine the position of the robot in the built map and achieve local positioning of the robot.
[0079] In the embodiment of the present application, when the robot is started for the second time to build a map, the current odometer data of the robot does not match the odometer data of the previous map. During the mapping process, it is necessary to integrate the previous odometer data for posture optimization. Therefore, it is necessary to correct the odometer coordinate system of the two previous and subsequent maps.
[0080] Assuming that the current odometer coordinate system is odomnew, and the odometer coordinate system during the last map construction is odomold, the fourth pose transformation matrix T_odomold_2_odomnew of the coordinate points in the odometer coordinate system odomold during the last map construction converted to the current odometer coordinate system odomnew can be expressed as:
[0081] T_odomold_2_odomnew
[0082] =(T_map_2_odomold) -1 *T_map_2_lidar*(T_odomnew_2_lidar) -1
[0083] Among them, T_map_2_odomold is the second pose transformation matrix of the odometer coordinate system of the target key frame in the map coordinate system, T_map_2_lidar is the first pose transformation matrix of the lidar coordinates at the current moment in the map coordinate system, and T_odomnew_2_lidar is the third pose transformation matrix of the lidar coordinates at the current moment in the odometer coordinate system before correction.
[0084] After determining that the coordinate points in the odometer coordinate system odomold of the last map are converted into the fourth pose transformation matrix T_odomold_2_odomnew of the current odometer coordinate system odomnew, the fifth pose transformation matrix T_odomold_2_lidar of the current lidar coordinate system relative to the corrected odometer coordinate system can be determined according to the formula: T_odomold_2_lidar=T_odomold_2_odomnew*T_odomnew_2_lidar.
[0085] According to the corrected odometer coordinate system, the robot can optimize its posture according to the odometer coordinate system during previous mapping, and combine the local positioning information of the robot to more effectively complete the robot's incremental mapping, so that the SLAM process is not limited to one-time completion. During the second mapping, there is no need to start from scratch. The previous mapping data and the constructed map can be effectively combined for incremental mapping, that is, the previous map can be expanded or updated, effectively improving the robot's mapping efficiency.
[0086] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0087] Figure 4 A schematic diagram of a robot mapping device provided in an embodiment of the present application, such as Figure 4 As shown, the device comprises:
[0088] An initial position acquisition unit 401 is used to acquire the initial position of the robot;
[0089] A reference point cloud determining unit 402 is used to search for a first predetermined number of key frames in a pre-stored key frame library according to the initial position of the robot, and determine the reference point clouds corresponding to the searched key frames;
[0090] The target key frame matching unit 403 is used to match the feature point cloud corresponding to the current frame acquired by the robot with the reference point cloud to determine the target key frame corresponding to the current frame;
[0091] The map improvement unit 404 is used to improve the built map corresponding to the pre-stored key frame library according to the target key frame corresponding to the current frame.
[0092] Figure 4 The robot mapping device shown in FIG. Figure 1 The robot mapping method shown corresponds to .
[0093] Figure 5 is a schematic diagram of a robot provided in one embodiment of the present application. Figure 5 As shown, the robot 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a robot mapping program. When the processor 50 executes the computer program 52, the steps in the above-mentioned robot mapping method embodiments are implemented. Alternatively, when the processor 50 executes the computer program 52, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0094] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 52 in the robot 5.
[0095] The robot may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the robot 5 and does not constitute a limitation of the robot 5. The robot 5 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the robot may also include input and output devices, network access devices, buses, etc.
[0096] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0097] The memory 51 may be an internal storage unit of the robot 5, such as a hard disk or memory of the robot 5. The memory 51 may also be an external storage device of the robot 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the robot 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the robot 5. The memory 51 is used to store the computer program and other programs and data required by the robot. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0098] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0099] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0100] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0101] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0103] In addition, each functional unit in each embodiment of 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0104] If the integrated module / unit 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 present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0105] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A robot mapping method, characterized in that: The method comprises: Get the initial position of the robot; According to the initial position of the robot, searching for a first predetermined number of key frames in a pre-stored key frame library, and determining reference point clouds corresponding to the searched key frames; Matching the feature point cloud corresponding to the current frame acquired by the robot with the reference point cloud to determine the target key frame corresponding to the current frame; According to the target key frame corresponding to the current frame, the built map corresponding to the pre-stored key frame library is improved; According to the initial position of the robot, searching for a first predetermined number of key frames in a pre-stored key frame library includes: Obtaining the distance between the pre-stored key frame and the initial value position; Sorting the distances to obtain a key frame sequence, and selecting a first predetermined number of key frames with smaller distances in the sequence; According to the target keyframe corresponding to the current frame, the built map corresponding to the pre-stored keyframe library is improved, including: Determine the fourth pose transformation matrix of the odometer coordinate system at the current moment before correction based on the second pose transformation matrix of the odometer coordinate system of the target key frame in the map coordinate system, the first pose transformation matrix of the lidar coordinates at the current moment in the map coordinate system, and the third pose transformation matrix of the lidar coordinates at the current moment in the odometer coordinate system before correction; Determine a fifth posture transformation matrix of the current laser radar coordinate system relative to the corrected odometer coordinate system according to the third posture transformation matrix and the fourth posture transformation matrix; According to the position of the target frame corresponding to the current frame in the map coordinate system and the first pose transformation matrix, the built map is improved.
2. The method according to claim 1, characterized in that Determine the reference point cloud corresponding to the key frame being searched, including: In the key frame sequence, taking the i-th key frame as the center, 2w+1 key frames are intercepted in the key frame sequence with a length of a second predetermined number w, wherein i is a positive integer less than the first predetermined number, and w is an integer greater than or equal to 0; The reference point cloud of the i-th key frame is constructed according to the intercepted point clouds of the 2w+1 key frames.
3. The method according to claim 1, characterized in that Matching the feature point cloud corresponding to the current frame acquired by the robot with the reference point cloud to determine the target key frame corresponding to the current frame, including: Determine the posture transformation matrix corresponding to the current frame of the robot; According to the posture transformation matrix, the feature point cloud corresponding to the current frame is transformed into a point cloud to be registered; Matching the point cloud to be registered with the reference point cloud corresponding to each key frame to determine the matching degree between the current frame and each key frame; The key frame with the best match is selected as the target key frame corresponding to the current frame.
4. The method according to claim 3, characterized in that Before selecting the key frame with the best matching degree as the target key frame corresponding to the current frame, the method further includes: Compare the matching degree of the key frame with the best matching degree with a preset matching degree threshold; If the matching degree of the key frame with the best matching degree is greater than or equal to the preset matching degree threshold, the key frame with the best matching degree is selected as the target key frame corresponding to the current frame; If the matching degree of the key frame with the best matching degree is less than a preset matching degree threshold, the initial value position is re-determined.
5. The method according to claim 3, characterized in that: The matching degree between the current frame and each key frame is the minimum mean square error between the to-be-registered point cloud corresponding to the current frame and the reference point cloud corresponding to each key frame.
6. A robot mapping device, characterized in that: The device comprises: An initial position acquisition unit, used to acquire the initial position of the robot; A reference point cloud determination unit, configured to search for a first predetermined number of key frames in a pre-stored key frame library according to the initial position of the robot, and determine reference point clouds corresponding to the searched key frames; A target key frame matching unit, used to match the feature point cloud corresponding to the current frame acquired by the robot with the reference point cloud to determine the target key frame corresponding to the current frame; A map improvement unit, used to improve the built map corresponding to the pre-stored key frame library according to the target key frame corresponding to the current frame; The reference point cloud determination unit is further used to obtain the distance between the pre-stored key frame and the initial value position; sort the key frame sequence according to the distance, and select a first predetermined number of key frames with smaller distances in the sequence; The map improvement unit is used to determine the fourth pose transformation matrix of the odometer coordinates of the current moment before correction based on the second pose transformation matrix of the odometer coordinate system of the target key frame in the map coordinate system, the first pose transformation matrix of the lidar coordinates in the map coordinate system at the current moment, and the third pose transformation matrix of the lidar coordinates in the odometer coordinate system before correction; determine the fifth pose transformation matrix of the current lidar coordinate system relative to the corrected odometer coordinate system based on the third pose transformation matrix and the fourth pose transformation matrix; and improve the constructed map based on the position of the target frame corresponding to the current frame in the map coordinate system and the first pose transformation matrix.
7. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Robot relocation method and device, computer readable storage medium and robot
CN110307838A
Robot positioning and mapping method and device based on depth image
CN110866496A
Method and equipment for carrying out SLAM initialization
CN111161347A
Method and equipment for carrying out SLAM initialization
CN111311684A
Method, apparatus and smart device for extracting keyframe in simultaneous localization and mapping
WO2020119140A1
