Multi-machine collaborative online mapping method, system and terminal device based on laser radar
Through a multi-machine collaborative online mapping method based on lidar, descriptor loop matching and global loop detection are used to solve the problem of cumulative errors in pose estimation between carriers and achieve efficient large-scale scene distribution in weak GPS signal scenarios. Mapping, suitable for underground exploration and indoor scenes.
Patent Information
- Application Number
- CN202311357804.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-19
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-10-19
AI Technical Summary
Existing multi-machine collaborative mapping technology is inefficient in large and extreme scenes, making it difficult to achieve large-scale map construction, and fails to effectively solve the problem of cumulative errors in pose estimation between carriers, especially in scenarios with weak GPS signals. protrude.
A multi-machine collaborative online mapping method based on lidar is used to define the main carrier and sub-carriers, and use descriptor loop matching and global loop detection to convert and optimize the odometry pose results between carriers to achieve a globally consistent point cloud map. Constructed to reduce the amount of data transmission, it is suitable for scenarios where the GPS signal is weak.
It achieves relative positioning between objects in scenes with weak GPS signals, improves the efficiency of distributed online mapping in large-scale scenes, reduces the amount of data transmission, ensures globally consistent pose map results, and corrects the accumulation between carriers. error.
Smart Images

Figure CN117289298B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and specifically to a laser radar-based multi-machine collaborative online mapping method, system and terminal device. Background Art
[0002] In the field of autonomous driving and robotics, based on LiDAR, the information from multiple sensors such as inertial measurement units (IMUs) and wheel speed encoders can be integrated to use simultaneous mapping and localization (SLAM) technology to estimate the pose of the mobile carrier during motion and build scene point cloud maps, thereby achieving survey and modeling of the actual scene environment. However, for large and extreme scenes, the efficiency of using a single machine to build maps is low, and it is difficult to complete map construction for a large range of scenes with a single acquisition.
[0003] The technical difficulty of multi-machine collaborative mapping is that the relative position relationship of each carrier is unknown. The mapping results of each carrier in its own local coordinate system need to be unified into the same coordinate system, that is, it is necessary to estimate the relative position transformation relationship between the origin of the local coordinate system and the global coordinate system of each carrier. In addition, as each carrier moves, there is a cumulative error in the pose estimated by the odometer. While realizing the local to global pose transformation estimation, it is necessary to eliminate the cumulative error of the pose estimation results of each carrier by introducing loop correction, and correct the odometer pose estimated by each carrier, and finally obtain a globally consistent point cloud map after eliminating the cumulative error. In order to realize multi-machine collaborative online mapping, how to effectively reduce the data efficiency and stability of online transmission and realize efficient and real-time information interaction is also the key to the application.
[0004] Among the patents for multi-machine collaborative mapping currently disclosed, CN114923477A proposes a multi-dimensional air-ground collaborative mapping system and method that integrates vision and laser SLAM technology. This method realizes mapping through the control and information processing of multiple carriers through a ground station, but does not solve the problem of map accumulation error as the odometer moves. CN108362294A proposes a multi-vehicle collaborative mapping method for autonomous driving that uses GPS for collaborative mapping of local maps of multiple vehicles. It does not consider the problem of accumulated errors in the mapping process and is not suitable for scenarios with poor GPS signals. Summary of the invention
[0005] In view of the deficiencies in the above-mentioned prior art, the present invention provides a laser radar-based multi-machine collaborative online mapping method, system and terminal device, which can perform relative positioning between carriers without relying on sensor information such as GPS. It is suitable for scenes with weak GPS signals such as underground exploration scenes and indoor scenes. The online data transmission only includes odometer posture information, descriptor information, and point cloud frame information that constitutes loop constraints. The data volume is small, which is conducive to real-time data transmission.
[0006] To achieve the above object, the present invention provides a laser radar-based multi-machine collaborative online mapping method, wherein one of all carriers is defined as a main carrier, the other carriers are defined as sub-carriers, and the local coordinate system of the main carrier is defined as a global coordinate system. The multi-machine collaborative online mapping method comprises the following steps:
[0007] Performing descriptor-based loopback matching at a preset frequency, screening out sub-carriers associated with the main carrier, and defining them as associated carriers;
[0008] Convert the odometer pose results of all associated carriers in the corresponding local coordinate system to the global coordinate system, and perform global loop detection at a preset frequency;
[0009] Based on the two point cloud frames with a loop relationship obtained by global loop closure detection, a relative pose constraint relationship is established, and based on the relative pose constraint relationship, the odometer pose results of the main carrier and all associated carrier point cloud frames are globally optimized;
[0010] Based on the odometer pose results after global pose optimization, the point cloud frames of the main carrier and all associated carriers are spliced to obtain the scene point cloud map.
[0011] In one embodiment, the descriptor-based loopback matching includes:
[0012] A descriptor search library is built based on the descriptors of all historical point cloud frames of the main carrier, and the following processing is performed on any sub-carrier for loopback matching:
[0013] Step 101, defining the candidate point cloud frame of the sub-carrier as point cloud frame #1, and obtaining the descriptor of point cloud frame #1, defining it as descriptor #1;
[0014] Step 102, searching the descriptor search library for a descriptor similar to descriptor #1:
[0015] If there is a descriptor similar to descriptor #1 in the descriptor search library, define it as descriptor #2 and proceed to step 103;
[0016] Otherwise, end the loopback matching of the current sub-carrier;
[0017] Step 103, define the point cloud frame corresponding to descriptor #2 as point cloud frame #2, and perform point cloud matching on point cloud frame #1 and point cloud frame #2:
[0018] If the match is successful, the current sub-carrier is determined to be an associated carrier, and the descriptors of all historical point cloud frames of the current sub-carrier are added to the descriptor search library;
[0019] Otherwise, the loopback matching of the current sub-carrier is terminated.
[0020] In one embodiment, the global loop detection includes:
[0021] All historical point cloud frames of the main carrier and all associated carriers before the last global loop detection are added to the point cloud frame search library, and all point cloud frames collected by the main carrier and all associated carriers after the last global loop detection are defined as new point cloud frames, and each new point cloud frame is processed as follows:
[0022] Step 201, searching the point cloud frame search library for a historical point cloud frame similar to the current new point cloud frame:
[0023] If there is a historical point cloud frame similar to the current new point cloud frame in the point cloud frame search library, proceed to step 202;
[0024] Otherwise, end the global loop detection of the current new point cloud frame;
[0025] Step 202: perform point cloud matching between the current new point cloud frame and the corresponding historical point cloud frame:
[0026] If the match is successful, it is determined that there is a loop relationship between the current new point cloud frame and the corresponding historical point cloud frame;
[0027] Otherwise, the global loop closure detection of the current new point cloud frame ends.
[0028] In one of the embodiments, in step 201, if there is a historical point cloud frame in the point cloud frame search library whose Euclidean distance with the current new point cloud frame is less than the Euclidean distance threshold, it is determined that the historical point cloud frame is similar to the current new point cloud frame.
[0029] In one embodiment, the global pose optimization includes:
[0030] In the global coordinate system, the adjacent pose edge constraint residual of the odometer is constructed based on the relative pose changes of two point cloud frames of the same carrier at adjacent times, and the loop pose edge constraint residual is constructed based on the relative pose of two point cloud frames with a loop relationship.
[0031] The total residual is constructed by combining the edge constraint residuals of all adjacent poses and the edge constraint residuals of all looped poses. The minimization of the total residual is used as the objective function and the odometer pose results of the point cloud frames of the main carrier and all associated carriers are used as control parameters for optimization. In this way, the odometer pose results of the point cloud frames of the main carrier and all associated carriers after global pose optimization are obtained.
[0032] In one embodiment, the objective function is:
[0033]
[0034] Among them, F(X) is the objective function, X is the odometer pose result of the main carrier and all associated carrier point cloud frames to be solved, n and m are the serial numbers corresponding to the point cloud frames, is the residual of the adjacent pose edge constraint, is the loop closure pose edge constraint residual, α and β are weight coefficients, and N is the number of point cloud frames.
[0035] In one embodiment, in the process of constructing the objective function, the weight coefficients α and β are adaptively adjusted based on the similarity of the point cloud matching solution, that is, the adjacent pose edge constraint residuals formed by the relative pose changes of two point cloud frames at each adjacent time have a weight coefficient α n , each set of two point cloud frames with a loop relationship constitutes a loop pose edge constraint residual with a weight coefficient β m , so the objective function is further:
[0036]
[0037] Among them, α n is the weight coefficient of the adjacent pose edge constraint residual formed by the relative pose change of two point cloud frames at adjacent moments in the nth group, β m is the weight coefficient of the loop closure pose edge constraint residual formed by the two point cloud frames in the mth group with a loop closure relationship;
[0038] Weight coefficient α n , β m for:
[0039]
[0040]
[0041] in, is the similarity score of two point cloud frames at the nth group of adjacent moments, is the similarity score of the two point cloud frames with loop closure relationship in the mth group, c 1 、c 2 is the proportionality coefficient.
[0042] In one of the embodiments, for a sub-carrier that is not defined as an associated carrier, local pose optimization is performed on the odometer pose result of the sub-carrier point cloud frame based on local loop closure detection.
[0043] In one embodiment, the local pose optimization includes:
[0044] Step 301, obtain the current point cloud frame of the sub-carrier, and perform loop search based on Euclidean distance in all historical point cloud frames of the sub-carrier:
[0045] If a historical point cloud frame whose Euclidean distance to the current point cloud frame is less than a preset threshold is found, proceed to step 302;
[0046] Otherwise, the local pose optimization of the current frame of the sub-carrier is terminated;
[0047] Step 302: perform point cloud matching on the current point cloud frame of the sub-carrier and the corresponding historical point cloud frame:
[0048] If the match is successful, a pose constraint is constructed based on the relative pose between the current new point cloud frame and the corresponding historical point cloud frame, and the odometer pose results of all historical point cloud frames of the sub-carrier are optimized based on the pose optimization to eliminate the accumulated error and complete the local pose optimization of the current frame of the sub-carrier;
[0049] Otherwise, the local pose optimization of the current frame of the sub-carrier is terminated.
[0050] To achieve the above object, the present invention further provides a laser radar-based multi-machine collaborative online mapping system, which adopts some or all of the steps of the above method, and the multi-machine collaborative online mapping system includes:
[0051] A loopback matching module, configured to perform descriptor-based loopback matching at a preset frequency, screen out sub-carriers associated with the main carrier, and define them as associated carriers;
[0052] A global loop detection module is used to convert the odometer poses of all associated carriers in the corresponding local coordinate system to the global coordinate system, and perform global loop detection at a preset frequency;
[0053] A global pose optimization module is used to construct a relative pose constraint relationship between two point cloud frames with a loop relationship obtained by global loop detection, and perform global pose optimization on the odometer pose results of the point cloud frames of the main carrier and all associated carriers based on the relative pose constraint relationship;
[0054] The point cloud map construction module is used to splice the point cloud frames of the main carrier and all associated carriers according to the odometer pose results of the point cloud frames after global pose optimization, so as to obtain the scene point cloud map.
[0055] To achieve the above object, the present invention further provides a terminal device, which is a computer, an unmanned vehicle, an unmanned aerial vehicle, an unmanned driving device or a mobile robot, and is provided with:
[0056] Memory, used to store programs;
[0057] A processor is used to execute the program stored in the memory. When the program is executed, the processor is used to execute part or all of the steps of the above method.
[0058] The present invention has the following beneficial technical effects:
[0059] 1. The present invention adopts descriptor-based loop matching in the process of associating carrier matching, and performs global loop detection based on the odometer pose results, so that loop detection can be realized by online transmission of small data such as odometer pose results and descriptors, thereby realizing coordinate unification between unknown position carriers, with a small amount of data, which is conducive to real-time data transmission;
[0060] 2. The present invention constructs a relative pose constraint relationship based on two point cloud frames with a loop relationship, and uses the relative pose constraint relationship to perform global pose optimization on the odometer pose results of the point cloud frames of the main carrier and all associated carriers, thereby effectively maintaining a globally consistent pose graph result;
[0061] 3. The present invention can effectively realize distributed online mapping of large-scale scenes by realizing online collaborative mapping among multiple mobile carriers, and does not rely on GPS and other sensor information for relative positioning between carriers. Therefore, it is suitable for scenes with weak GPS signals, such as underground exploration scenes and indoor scenes;
[0062] 4. In the preferred embodiment of the present invention, local loop detection and local posture optimization are performed inside the sub-carrier, thereby effectively correcting the accumulated error of the odometer and improving the accuracy of relative positioning between carriers. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0064] Figure 1 This is a flow chart of the multi-machine collaborative online mapping method in Example 1 of the present invention;
[0065] Figure 2 This is a flow chart of the loopback matching of the sub-carriers in Example 1 of the present invention;
[0066] Figure 3 This is a flowchart of local posture optimization in Example 1 of the present invention;
[0067] Figure 4 This is a structural block diagram of a multi-machine collaborative online mapping system in Embodiment 2 of the present invention;
[0068] Figure 5 This is a structural block diagram of the terminal device in Example 3 of the present invention.
[0069] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0072] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0073] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, a physical connection, or a wireless communication connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0074] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0075] Example 1
[0076] This embodiment discloses a multi-machine collaborative online mapping method based on laser radar. Each mobile carrier realizes online estimation of its own local coordinate system through laser SLAM technology, and calculates the descriptor of the point cloud frame. Among the multiple mobile carriers, the one with stronger processing performance is selected as the main carrier, and the other carriers transmit the estimated local pose and descriptor to the main carrier through the network. The main carrier retrieves and matches the descriptors of all other carriers online, and for the possible loop frames searched for by the descriptor matching, the main carrier sends a point cloud frame data request to the mobile carrier associated with the loop frame, and transmits the point cloud frame data to the main carrier for point cloud matching. Successful matching and solution can determine the accurate relative pose transformation of the two frames of point cloud frames. Taking the main carrier as the global coordinate system reference, the transformation of the local coordinate system of the mobile carrier relative to the global coordinate system can be obtained, thereby realizing the coordinate system of multiple carriers. At the same time, once the loop information is successfully matched, the subsequent odometer motion estimation of other carriers can be calculated based on the global coordinate system. The loop detection module of the main carrier can trigger loop detection correction at intervals of a period of time, and retrieve whether there is a possibility of loop between the newly collected trajectory and the processed part of the trajectory through the position Euclidean distance. Send a point cloud data request to the carrier corresponding to the point cloud frame of the possible loop and return the match, and build a constraint relationship for the poses of the two frames that are successfully matched. The back-end processing module of the main carrier is responsible for maintaining the joint pose graph optimization of all carrier motion trajectories that have been unified to the global coordinate system, thereby eliminating the accumulated errors of each carrier motion estimation over time and maintaining the global consistency of all poses.
[0077] In terms of hardware, each mobile carrier is equipped with a lidar sensor, an embedded processor, communication module hardware and a data storage device. Among them, the lidar sensor is used to collect real-time point cloud frames during the movement of the mobile carrier. Optionally, other sensors that assist in odometer pose estimation, such as IMU, wheel speed encoder, etc., can also be carried on the mobile carrier. The embedded processor is mainly used for position estimation, loop detection, and pose optimization, etc. The communication module hardware is mainly used for data transmission between carriers, and the data storage device is mainly used to store point cloud frame data, etc., for offline extraction.
[0078] In terms of software, the main carrier is equipped with a real-time data transceiver module, a delayed data receiving module, a front-end odometer module, a descriptor calculation module, a data access module, a global loop detection module and a back-end graph optimization module. The sub-carrier is equipped with a real-time data transceiver module, a delayed data sending module, a front-end odometer module, a descriptor calculation module and a local loop detection module. Among them, the real-time data transceiver module of the main carrier is mainly used to receive data from other carriers and request data from outside, and the real-time data transceiver module of the sub-carrier is mainly used to send data to the main carrier and receive requests from the main carrier. The delayed data receiving module is mainly used to receive the point cloud frame data of each carrier, and its transmission rate is low; the delayed data sending module is mainly used to send all point cloud frame data to the main carrier, and its delay is large. The front-end odometer module is mainly used for online estimation of the pose of each carrier, the descriptor calculation module is mainly used for descriptor calculation of each carrier, the global loop detection module and the back-end graph optimization module are used for joint pose graph optimization of all carrier motion trajectories that have been unified to the global coordinate system, and the local loop detection module is used for local pose graph optimization of the sub-carrier motion trajectory.
[0079] refer to Figure 1 The multi-machine collaborative online mapping method in this embodiment specifically includes the following steps:
[0080] Perform descriptor-based loopback matching at a preset frequency, and perform point cloud matching on the point cloud frames corresponding to the two successfully matched descriptors, so as to screen out the sub-carriers associated with the main carrier and define them as associated carriers;
[0081] Based on the corresponding point cloud matching results, the odometer pose results of all associated carriers in the corresponding local coordinate system are converted to the global coordinate system, and global loop detection and point cloud matching are performed based on the odometer pose results at a preset frequency;
[0082] Based on the two point cloud frames with loop relationship obtained by global loop closure detection, a relative pose constraint relationship is constructed, and based on the constructed relative pose constraint relationship, the odometer pose results of the main carrier and all associated carrier point cloud frames are globally optimized;
[0083] When all carriers have completed their collection and the transmission of point cloud frame data between all carriers has been completed, the main carrier will transform the point cloud frames of the main carrier and all associated carriers based on the odometer pose results after global pose optimization and then splice them to obtain a complete scene point cloud map.
[0084] In this embodiment, the initial odometer pose results of the carrier are calculated by the front-end odometer module. Specifically, after each mobile carrier is started, the collected lidar point cloud frame is matched and solved by the iterative closest point method (ICP) or the normal distribution transform method (NDT) and other matching and solving methods, and the relative pose change of the two frames of lidar sensors is calculated for the lidar point cloud frame data at adjacent sampling moments, and the relative pose change is accumulated to obtain the laser odometer in the local coordinate system. Among them, the local coordinate system of the carrier refers to the local coordinate system with the lidar position at the sampling moment of the first frame as the origin, and the relative position of each carrier at the starting moment is unknown.
[0085] In this embodiment, the descriptor of the point cloud frame adopts ScanContext descriptor, or other forms of descriptors may be used. ScanContext descriptor is an effective description method for extracting 3D structural information of point cloud frames in the field of LidarSLAM. Its advantage is that it has rotation invariance to the heading angle, can be applied to the similarity judgment of point cloud frames under different rotation postures, can be used for the recognition of similar scenes, and is mostly used in the field of LidarSLAM loop detection. Compared with the complete point cloud frame data, the descriptor extracts effective point cloud structure information, and the data scale is small. Each carrier extracts a 3D point cloud structure information descriptor with rotation invariance for the current latest point cloud frame based on the ScanContext method. Other sub-carriers transmit the descriptor to the main carrier for loop matching based on the descriptor. When the match is successful, the main carrier sends a request to the sub-carrier corresponding to the descriptor, so that the sub-carrier uploads the corresponding point cloud frame for point cloud matching. This process can realize loop detection by online transmission of small data such as odometer posture results and descriptors, thereby realizing the coordinate unification between unknown position carriers, with a small amount of data, which is conducive to real-time data transmission. As for each sub-carrier, the collected lidar point cloud frames are first written into the local data storage device, and the delayed point cloud transmission module is started to send the local point cloud frames to the main carrier delayed receiving module in succession. The main carrier completes the summary storage of the point cloud data of all carriers. This step does not require high real-time performance and can be delayed as appropriate according to resource usage or unified data transmission after the map is completed.
[0086] refer to Figure 2 In the specific implementation process, based on the descriptor loop matching and the process of determining the associated carrier, a descriptor search library is first built on the main carrier based on the descriptors of all historical point cloud frames of the main carrier, and any sub-carrier that needs to be loop matched is processed as follows:
[0087] Step 101, defining the candidate point cloud frame of the sub-carrier as point cloud frame #1, and obtaining the descriptor of point cloud frame #1, which is defined as descriptor #1, wherein the candidate point cloud frame of the sub-carrier is specifically all point cloud frames collected by the sub-carrier after the last loopback matching;
[0088] Step 102: The sub-carrier uploads descriptor #1 to the main carrier, and searches for a descriptor similar to descriptor #1 in the descriptor search library. Specifically, the descriptor search library searches for a descriptor whose similarity to descriptor #1 is greater than a set threshold:
[0089] If there is a descriptor similar to descriptor #1 in the descriptor search library, define it as descriptor #2 and proceed to step 103;
[0090] Otherwise, end the loopback matching of the current sub-carrier;
[0091] Step 103: The main carrier sends a request to the sub-carrier corresponding to descriptor #1, so that the sub-carrier uploads point cloud frame #1 to the main carrier, and then defines the point cloud frame corresponding to descriptor #2 of the main carrier as point cloud frame #2, and uses ICP or NDT method to match point cloud frame #1 with point cloud frame #2, and solves the relative pose transformation of point cloud frame #1 and point cloud frame #2.
[0092] If the match is successful, the current sub-carrier is determined to be an associated carrier, and the descriptors of all historical point cloud frames of the current sub-carrier are added to the descriptor search library, and then participate in the descriptor loop search of candidate point cloud frames of other carriers;
[0093] Otherwise, the loopback matching of the current sub-carrier is terminated.
[0094] When a sub-carrier is determined to be an associated carrier, the main carrier sends a request to the sub-carrier for the odometer pose results of all historical point cloud frames of the sub-carrier, including the pose of candidate frame #1 in the local coordinate system B of the sub-carrier. The pose of the matched historical point cloud frame #2 in the main carrier in the global coordinate system G is Then the relative transformation of the coordinate origin of the local coordinate system B of the sub-carrier and the global coordinate system G of the main carrier can be determined for:
[0095]
[0096] In this way, the local coordinate system and the global coordinate system of the sub-carrier are unified, and the odometer pose results of the point cloud frame of the sub-carrier can be transformed by the coordinate system After converting to the global coordinate system, the main carrier sends a signal to the sub-carrier to end the local loop detection module inside the sub-carrier.
[0097] If the current sub-carrier is not determined to be an associated carrier, the descriptor of the sub-carrier is stored according to the carrier number and added to the descriptor search library after subsequent successful matching.
[0098] As a preferred implementation, for the sub-carriers that are not defined as associated carriers, local pose optimization is performed on the odometer pose results of the sub-carrier point cloud frame based on local loop closure detection. Figure 3 , the specific implementation process of local pose optimization includes:
[0099] Step 301, obtain the current point cloud frame of the sub-carrier, and perform loop search based on Euclidean distance in all historical point cloud frames of the sub-carrier:
[0100] If a historical point cloud frame whose Euclidean distance to the current point cloud frame is less than a preset threshold is found, proceed to step 302;
[0101] Otherwise, the local pose optimization of the current frame of the sub-carrier is terminated, and the next local pose optimization is waited for;
[0102] Step 302: Use ICP or NDT method to perform point cloud matching between the current point cloud frame of the sub-carrier and the corresponding historical point cloud frame:
[0103] If the match is successful, a pose constraint is constructed based on the relative pose between the current new point cloud frame and the corresponding historical point cloud frame, and the odometer pose results of all historical point cloud frames of the sub-carrier are optimized based on the pose optimization to eliminate the accumulated error and complete the local pose optimization of the current frame of the sub-carrier. The global pose optimization method in the optimization process is basically the same, so it will not be described in detail in this embodiment;
[0104] Otherwise, the local pose optimization of the current frame of the sub-carrier is terminated, and the next local pose optimization is waited for.
[0105] For all associated carriers that have been unified to the global coordinate system, the local odometer calculation results of the associated carriers can be converted to the global coordinate system for description. The main carrier triggers loop detection at a preset frequency, that is, the local poses of all new point cloud frames generated by the associated carrier after the last global loop detection are converted to the global coordinate system and loop searches are performed in sequence. According to the global pose of the point cloud frame, other historical point cloud frames that meet the Euclidean distance threshold in the global coordinate system are searched. If two frames of data with a loop relationship are found, a point cloud data request is sent to the corresponding carrier to match and solve the relative pose of the two frames of point clouds. The constraint relationship of the relative pose is successfully constructed to participate in the subsequent back-end pose graph optimization. Specifically, all historical point cloud frames of the main carrier and all associated carriers before the last global loop detection are added to the point cloud frame search library, and all point cloud frames collected by the main carrier and all associated carriers after the last global loop detection are defined as new point cloud frames, and each new point cloud frame is processed as follows:
[0106] Step 201, searching the point cloud frame search library for a historical point cloud frame similar to the current new point cloud frame. Specifically, if there is a historical point cloud frame in the point cloud frame search library whose Euclidean distance with the current new point cloud frame is less than the Euclidean distance threshold, then the historical point cloud frame is determined to be similar to the current new point cloud frame:
[0107] If there is a historical point cloud frame similar to the current new point cloud frame in the point cloud frame search library, proceed to step 202;
[0108] Otherwise, end the global loop closure detection of the current new point cloud frame and directly proceed to the global loop closure detection of the next new point cloud frame;
[0109] Step 202: Use ICP or NDT method to perform point cloud matching between the current new point cloud frame and the corresponding historical point cloud frame:
[0110] If the match is successful, it is determined that there is a loop relationship between the current new point cloud frame and the corresponding historical point cloud frame;
[0111] Otherwise, the global loop closure detection of the current new point cloud frame is terminated and the global loop closure detection of the next new point cloud frame is performed.
[0112] It is worth noting that if this is the first global loop detection, a preset time can be set or a threshold for the number of point cloud frames can be set. For example, when the number of historical point cloud frames currently collected by the main carrier reaches the threshold, the first global loop detection is performed.
[0113] In this embodiment, the process of performing global posture optimization specifically includes:
[0114] In the global coordinate system, the adjacent pose edge constraint residual of the odometer is constructed based on the relative pose changes of two point cloud frames of the same carrier at adjacent times, and the loop pose edge constraint residual is constructed based on the relative pose of two point cloud frames with a loop relationship.
[0115] The total residual is constructed by combining the residuals of all adjacent pose constraints and the residuals of all loop pose constraints. The objective function is to minimize the total residual and the odometer pose results of the point cloud frames of the main carrier and all associated carriers are used as control parameters for optimization. The odometer pose results of the point cloud frames of the main carrier and all associated carriers after global pose optimization are obtained. The objective function is:
[0116]
[0117] Among them, F(X) is the objective function, X is the odometer pose result of the main carrier and all associated carrier point cloud frames to be solved, n and m are the serial numbers corresponding to the point cloud frames, is the residual of the adjacent pose edge constraint, is the loop closure pose edge constraint residual, α and β are weight coefficients, and N is the number of point cloud frames.
[0118] In the specific implementation process, the Gauss-Newton method is used to optimize and solve the above objective function, and the optimized pose results of all point cloud frames after loop correction can be obtained.
[0119] As a preferred implementation, in the process of constructing the objective function, the weight coefficients α and β are adaptively adjusted based on the similarity of the point cloud matching solution, that is, the adjacent pose edge constraint residuals formed by the relative pose changes of two point cloud frames at each adjacent moment have a weight coefficient α n , each set of two point cloud frames with a loop relationship constitutes a loop pose edge constraint residual with a weight coefficient β m , that is, the objective function is preferably:
[0120]
[0121] Among them, α n is the weight coefficient of the adjacent pose edge constraint residual formed by the relative pose change of two point cloud frames at adjacent moments in the nth group, β m It is the weight coefficient of the loop closure pose edge constraint residual formed by the mth group of two point cloud frames with a loop closure relationship.
[0122] In the specific implementation process, the weight coefficient α is determined based on the similarity score between the two point cloud frames. n , β m , for example, can be set to:
[0123]
[0124]
[0125] in, is the similarity score of two point cloud frames at the nth group of adjacent moments, is the similarity score of the two point cloud frames with loop closure relationship in the mth group, c 1 、c 2 is the proportionality coefficient.
[0126] Based on the similarity scores of the two point cloud frames, the weight of the residual in the objective function is adaptively calculated. Since the similarity score of the point cloud frame with more obvious features is higher, the corresponding weight coefficient is higher, so that more point cloud frames with obvious features are used in the global pose optimization process to improve the optimization effect. In this embodiment, the calculation process of the similarity scores of the two point cloud frames is specifically as follows:
[0127] First, the two point cloud frames that constitute the loop or the two adjacent point cloud frames of the odometer are downsampled, and the two downsampled point cloud frames are searched for point cloud matching pairs that meet the matching distance threshold requirements according to the principle of nearest neighbor matching according to the relative pose results of the matching solution.
[0128] Secondly, the curvature is calculated for each pair of two points in each point cloud matching pair. The process includes:
[0129] Based on the m points in the neighborhood of point a(x,y,z), calculate the covariance matrix:
[0130]
[0131] Among them, the neighborhood points refer to the m points with the smallest Euclidean space distance when searching by Euclidean space distance. is the mean of the x, y, and z axis coordinates of all neighborhood points;
[0132] Decompose the covariance matrix to obtain the eigenvectors and eigenvalues, and take the minimum eigenvalue λ to calculate the curvature k, which is:
[0133]
[0134] The curvature difference of the two matched points is calculated, and the similarity of the two point cloud frames is calculated by combining all n matching pairs of the two point cloud frames.
[0135] Sex score, which is:
[0136] d(i,j)=|k i -k j |
[0137]
[0138] Among them, d(i,j) is the difference in curvature between point i and point j.
[0139] The multi-machine collaborative online mapping method in this embodiment can realize online collaborative mapping among multiple mobile carriers, and realize coordinate unification among carriers with unknown positions by realizing real-time loop detection through online transmission of odometer pose results and descriptors and other small data. The accumulated error of the odometer is corrected by maintaining global and local loop detection inside the main carrier and the sub-carrier, while maintaining a globally consistent pose graph result. It can effectively realize distributed online mapping of large-scale scenes, and does not rely on GPS and other sensor information for relative positioning between carriers. Therefore, it is suitable for scenes with weak GPS signals, such as underground exploration scenes and indoor scenes.
[0140] Example 2
[0141] Based on the multi-machine collaborative online mapping method in Example 1, this embodiment discloses a multi-machine collaborative online mapping system based on laser radar. Figure 4 The multi-machine collaborative online mapping system includes a loop matching module, a global loop detection module, a global pose optimization module and a point cloud map construction module. The multi-machine collaborative online mapping system is used to execute some or all steps of the multi-machine collaborative online mapping method in Example 1 to achieve multi-machine collaborative online mapping. Specifically:
[0142] The loopback matching module is used to perform descriptor-based loopback matching at a preset frequency, screen out sub-carriers associated with the main carrier, and define them as associated carriers;
[0143] The global loop detection module is used to transform the odometer poses of all associated carriers in the corresponding local coordinate system to the global coordinate system, and perform global loop detection at a preset frequency;
[0144] The global pose optimization module is used to construct a relative pose constraint relationship based on two point cloud frames with a loop relationship obtained by global loop detection, and perform global pose optimization on the odometer pose results of the main carrier and all associated carrier point cloud frames based on the relative pose constraint relationship;
[0145] The point cloud map construction module is used to splice the point cloud frames of the main carrier and all associated carriers according to the odometer pose results of the point cloud frames after global pose optimization, so as to obtain the scene point cloud map.
[0146] In this embodiment, the specific working process and working principle of the loop matching module, the global loop detection module, the global pose optimization module and the point cloud map construction module are the same as the method in Example 1, so they will not be repeated in this embodiment.
[0147] Example 3
[0148] like Figure 5 The terminal device disclosed in this embodiment is shown, including a transmitter, a receiver, a memory and a processor. Among them, the transmitter is used to send instructions and data, the receiver is used to receive instructions and data, the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions stored in the memory to implement some or all of the steps executed by the multi-machine collaborative online mapping method in the above-mentioned embodiment 1. Its specific implementation process is the same as the multi-machine collaborative online mapping method in the above-mentioned embodiment 1.
[0149] It should be noted that the above memory can be independent or integrated with the processor. When the memory is independently provided, the terminal device further includes a bus for connecting the memory and the processor.
[0150] In the specific application process, the terminal device is a computer, an unmanned vehicle, a drone, an unmanned driving device or a mobile robot, etc.
[0151] Example 4
[0152] This embodiment discloses a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, some or all of the steps executed by the multi-machine collaborative online mapping method in the above-mentioned embodiment 1 are implemented.
[0153] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A multi-machine collaborative online mapping method based on LiDAR. It is characterized in that One of all carriers is defined as a main carrier, the other carriers are defined as sub-carriers, and the local coordinate system of the main carrier is defined as a global coordinate system. The multi-machine collaborative online mapping method includes the following steps: Performing descriptor-based loopback matching at a preset frequency, screening out sub-carriers associated with the main carrier, and defining them as associated carriers, the descriptor-based loopback matching comprising: A descriptor search library is built based on the descriptors of all historical point cloud frames of the main carrier, and the following processing is performed on any sub-carrier for loopback matching: Step 101, defining the candidate point cloud frame of the sub-carrier as point cloud frame #1, and obtaining the descriptor of point cloud frame #1, defining it as descriptor #1; Step 102, searching the descriptor search library for a descriptor similar to descriptor #1: If there is a descriptor similar to descriptor #1 in the descriptor search library, define it as descriptor #2 and proceed to step 103; Otherwise, end the loopback matching of the current sub-carrier; Step 103, define the point cloud frame corresponding to descriptor #2 as point cloud frame #2, and perform point cloud matching on point cloud frame #1 and point cloud frame #2: If the match is successful, the current sub-carrier is determined to be an associated carrier, and the descriptors of all historical point cloud frames of the current sub-carrier are added to the descriptor search library; Otherwise, end the loopback matching of the current sub-carrier; The odometer pose results of all associated carriers in the corresponding local coordinate system are converted to the global coordinate system, and global loop detection is performed at a preset frequency, including: All historical point cloud frames of the main carrier and all associated carriers before the last global loop detection are added to the point cloud frame search library, and all point cloud frames collected by the main carrier and all associated carriers after the last global loop detection are defined as new point cloud frames, and each new point cloud frame is processed as follows: Step 201, searching the point cloud frame search library for a historical point cloud frame similar to the current new point cloud frame: If there is a historical point cloud frame similar to the current new point cloud frame in the point cloud frame search library, proceed to step 202; Otherwise, end the global loop detection of the current new point cloud frame; Step 202: perform point cloud matching between the current new point cloud frame and the corresponding historical point cloud frame: If the match is successful, it is determined that there is a loop relationship between the current new point cloud frame and the corresponding historical point cloud frame; Otherwise, end the global loop detection of the current new point cloud frame; Based on the two point cloud frames with a loop relationship obtained by global loop closure detection, a relative pose constraint relationship is established, and based on the relative pose constraint relationship, the odometer pose results of the main carrier and all associated carrier point cloud frames are globally optimized; Based on the odometer pose results after global pose optimization, the point cloud frames of the main carrier and all associated carriers are spliced to obtain the scene point cloud map.
2. The laser radar-based multi-machine collaborative online mapping method according to claim 1, It is characterized in that In step 201, if there is a historical point cloud frame in the point cloud frame search library whose Euclidean distance with the current new point cloud frame is less than the Euclidean distance threshold, it is determined that the historical point cloud frame is similar to the current new point cloud frame.
3. The laser radar-based multi-machine collaborative online mapping method according to claim 1 or 2, It is characterized in that The global pose optimization includes: In the global coordinate system, the adjacent pose edge constraint residual of the odometer is constructed based on the relative pose changes of two point cloud frames of the same carrier at adjacent times, and the loop pose edge constraint residual is constructed based on the relative pose of two point cloud frames with a loop relationship. The total residual is constructed by combining the edge constraint residuals of all adjacent poses and the edge constraint residuals of all looped poses. The minimization of the total residual is used as the objective function and the odometer pose results of the point cloud frames of the main carrier and all associated carriers are used as control parameters for optimization. In this way, the odometer pose results of the point cloud frames of the main carrier and all associated carriers after global pose optimization are obtained.
4. The laser radar-based multi-machine collaborative online mapping method according to claim 3, It is characterized in that The objective function is: Among them, F(X) is the objective function, X is the odometer pose result of the main carrier and all associated carrier point cloud frames to be solved, n and m are the serial numbers corresponding to the point cloud frames, is the residual of the adjacent pose edge constraint, is the loop closure pose edge constraint residual, α and β are weight coefficients, and N is the number of point cloud frames.
5. The laser radar-based multi-machine collaborative online mapping method according to claim 4, It is characterized in that In the process of constructing the objective function, the weight coefficients α and β are adaptively adjusted based on the similarity of the point cloud matching solution, that is, the adjacent pose edge constraint residuals formed by the relative pose changes of two point cloud frames at each adjacent moment have a weight coefficient α n , each set of two point cloud frames with a loop relationship constitutes a loop pose edge constraint residual with a weight coefficient β m , so the objective function is further: Among them, α n is the weight coefficient of the adjacent pose edge constraint residual formed by the relative pose change of two point cloud frames at adjacent moments in the nth group, β m is the weight coefficient of the loop closure pose edge constraint residual formed by the two point cloud frames in the mth group with a loop closure relationship; Weight coefficient α n , β m for: in, is the similarity score of two point cloud frames at the nth group of adjacent moments, is the similarity score of the two point cloud frames with loop closure relationship in the mth group, c 1 、c 2 is the proportionality coefficient.
6. The laser radar-based multi-machine collaborative online mapping method according to claim 5, It is characterized in that For the sub-carriers that are not defined as associated carriers, local pose optimization is performed on the odometer pose results of the sub-carrier point cloud frame based on local loop closure detection. The local pose optimization includes: Step 301, obtain the current point cloud frame of the sub-carrier, and perform loop search based on Euclidean distance in all historical point cloud frames of the sub-carrier: If a historical point cloud frame whose Euclidean distance to the current point cloud frame is less than a preset threshold is found, proceed to step 302; Otherwise, the local pose optimization of the current frame of the sub-carrier is terminated; Step 302: perform point cloud matching on the current point cloud frame of the sub-carrier and the corresponding historical point cloud frame: If the match is successful, a pose constraint is constructed based on the relative pose between the current new point cloud frame and the corresponding historical point cloud frame, and the odometer pose results of all historical point cloud frames of the sub-carrier are optimized based on the pose optimization to eliminate the accumulated error and complete the local pose optimization of the current frame of the sub-carrier; Otherwise, the local pose optimization of the current frame of the sub-carrier is terminated.
7. A multi-machine collaborative online mapping system based on LiDAR. It is characterized in that Using the steps of the method described in any one of claims 1 to 6, the multi-machine collaborative online mapping system comprises: A loopback matching module, configured to perform descriptor-based loopback matching at a preset frequency, screen out sub-carriers associated with the main carrier, and define them as associated carriers; A global loop detection module is used to convert the odometer poses of all associated carriers in the corresponding local coordinate system to the global coordinate system, and perform global loop detection at a preset frequency; A global pose optimization module is used to construct a relative pose constraint relationship between two point cloud frames with a loop relationship obtained by global loop detection, and perform global pose optimization on the odometer pose results of the point cloud frames of the main carrier and all associated carriers based on the relative pose constraint relationship; The point cloud map construction module is used to splice the point cloud frames of the main carrier and all associated carriers according to the odometer pose results of the point cloud frames after global pose optimization, so as to obtain the scene point cloud map.
8. A terminal device, It is characterized in that The terminal device is a computer, an unmanned vehicle, an unmanned aerial vehicle, an unmanned driving device or a mobile robot, and is provided with: Memory, used to store programs; A processor, configured to execute the program stored in the memory; when the program is executed, the processor is configured to execute the method steps as claimed in any one of claims 1 to 6.
