Localization method and apparatus, and electronic device and computer program product

By coupling the pre-integration results of lidar and IMU in SLAM, and combining planar constraints and error loss function optimization, the pose estimation problem under insufficient radar observation is solved, improving the accuracy and robustness of positioning.

WO2026242433A1PCT designated stage Publication Date: 2026-11-26UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/147677
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-23
Filing Date
2025-12-31
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing SLAM schemes struggle to achieve stable pose estimation when radar observations are insufficient, resulting in poor positioning accuracy.

Method used

The initial radar pose is obtained by coupling the pre-integration results of the lidar with the inertial measurement unit (IMU), and the target radar pose is determined by optimization through planar constraints and error loss function.

Benefits of technology

Stable pose estimation was achieved when radar observation was insufficient, improving the accuracy and robustness of positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025147677_26112026_PF_FP_ABST
    Figure CN2025147677_26112026_PF_FP_ABST
Patent Text Reader

Abstract

The present application is applicable to the technical field of navigation, and in particular, relates to a localization method and apparatus, and an electronic device and a computer program product. In the method, the electronic device may acquire a first point cloud frame, which is collected by a LiDAR, and may acquire multiple frames of IMU data, which are collected by an IMU between a second moment and a first moment. Subsequently, the electronic device may obtain a pre-integration result on the basis of the multiple frames of IMU data, and may obtain, on the basis of the pre-integration result, an initial LiDAR pose corresponding to each laser point of the first point cloud frame. Then, the electronic device may obtain, on the basis of the pre-integration result and the initial LiDAR pose corresponding to each laser point of the first point cloud frame, a target LiDAR pose corresponding to the electronic device. That is to say, in the present application, by means of coupling LiDAR observations with IMU pre-integration, a target pose of an electronic device is determined, such that better robustness is achieved when the LiDAR observations are insufficient, so as to realize stable pose estimation, thereby improving the localization accuracy of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Positioning methods, devices, electronic equipment and computer program products

[0001] This application claims priority to Chinese Patent Application No. 202510672992.0, filed on May 23, 2025, entitled “Positioning Method, Apparatus, Electronic Device and Computer Program Product”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application belongs to the field of navigation technology, and in particular relates to a positioning method, device, electronic device and computer program product. Background Technology

[0003] With the rapid development of robotics, autonomous driving, augmented reality (AR), and virtual reality (VR), the demand for precise positioning is increasing. Simultaneous localization and mapping (SLAM) can achieve autonomous navigation and positioning. SLAM typically uses LiDAR to acquire point clouds of the surrounding environment for navigation and positioning. However, existing SLAM solutions struggle to achieve stable pose estimation when radar observations are insufficient, resulting in poor positioning accuracy. Summary of the Invention

[0004] This application provides a positioning method, apparatus, electronic device, and computer program product that can achieve stable pose estimation and improve positioning accuracy when radar observation is insufficient.

[0005] In a first aspect, embodiments of this application provide a positioning method applied to an electronic device, the electronic device including a lidar and an inertial measurement unit (IMU), the positioning method including:

[0006] Obtain the first point cloud frame acquired by the lidar;

[0007] Acquire multiple frames of IMU data between the second time point and the first time point; wherein, the second time point is the time when the lidar acquires the second point cloud frame, the first time point is the time when the lidar acquires the first point cloud frame, and the second point cloud frame is a point cloud frame preceding the first point cloud frame;

[0008] Based on the multi-frame IMU data, the pre-integration result is obtained;

[0009] Based on the pre-integration results, the initial radar pose corresponding to each laser point in the first point cloud frame is obtained;

[0010] Based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame, the target radar pose corresponding to the electronic device is obtained.

[0011] In the positioning method provided above, the electronic device can determine the target pose of the electronic device by coupling radar observation with IMU pre-integration, which makes it more robust when radar observation is insufficient, so as to achieve stable pose estimation and improve the positioning accuracy of the electronic device.

[0012] In some embodiments, obtaining the initial radar pose corresponding to each laser point in the first point cloud frame based on the pre-integration result may include:

[0013] Based on the pre-integration results, the target IMU pose corresponding to each frame of IMU data is obtained;

[0014] Obtain the acquisition time corresponding to the nth laser point in the first point cloud frame; 0≤n<N, where N is the number of laser points included in the first point cloud frame;

[0015] Based on the acquisition time corresponding to the nth laser point and the pose of each target IMU, the candidate radar pose corresponding to the nth laser point is obtained;

[0016] The initial radar pose corresponding to the nth laser point is obtained based on the candidate radar pose corresponding to the nth laser point and the initial radar pose corresponding to the first laser point; wherein, the first laser point is the laser point with the earliest acquisition time in the first point cloud frame; the initial radar pose corresponding to the first laser point is the candidate radar pose corresponding to the first laser point.

[0017] In one embodiment, after obtaining the initial radar pose corresponding to the nth laser point based on the candidate radar pose corresponding to the nth laser point and the initial radar pose corresponding to the first laser point, the localization method may further include:

[0018] Based on the initial radar pose corresponding to the nth laser point, the first keyframe set corresponding to the nth laser point is obtained;

[0019] Based on each keyframe in the first keyframe set, a first local map corresponding to the first keyframe set is obtained;

[0020] Based on the first local map, the initial radar pose corresponding to the nth laser point is optimized to obtain the optimized initial radar pose corresponding to the nth laser point.

[0021] The step of obtaining the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame may include:

[0022] Based on the pre-integration result and the optimized initial radar pose corresponding to each laser point in the first point cloud frame, the target radar pose corresponding to the electronic device is obtained.

[0023] In some embodiments, the positioning method may further include:

[0024] Obtain the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector corresponding to the third point cloud frame; the third point cloud frame is the first point cloud frame acquired by the lidar.

[0025] In response to the angle between the first plane normal vector and the initial plane normal vector being less than a preset threshold, the plane constraint residual is obtained based on the first plane normal vector and the initial plane normal vector;

[0026] The step of obtaining the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame may include:

[0027] Based on the planar constraint residual, the pre-integration result, and the initial radar pose corresponding to each laser point in the first point cloud frame, the target radar pose corresponding to the electronic device is obtained.

[0028] In one embodiment, obtaining the target radar pose corresponding to the electronic device based on the planar constraint residual, the pre-integration result, and the initial radar pose corresponding to each laser point in the first point cloud frame may include:

[0029] Based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame, the pre-integration residual is obtained.

[0030] Based on the first point cloud frame, the point-to-surface residual is obtained;

[0031] Based on the planar constraint residual, the pre-integration residual, and the point-to-surface residual, the error loss function is jointly optimized to obtain the target radar pose corresponding to the electronic device.

[0032] In one embodiment, obtaining the first plane normal vector corresponding to the first point cloud frame may include:

[0033] Obtain the installation height of the lidar;

[0034] Based on the installation height, the target laser point is obtained from the first point cloud frame;

[0035] Fit a point cloud plane based on the target laser point, and obtain the first plane normal vector corresponding to the point cloud plane.

[0036] In some embodiments, after obtaining the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame, the positioning method may further include:

[0037] In response to the first point cloud frame being a key frame, a second set of key frames corresponding to the first point cloud frame is obtained based on the target radar pose.

[0038] Based on the first point cloud frame and the second key frame set, obtain the loopback frame;

[0039] Based on the loopback frame, a second key frame is obtained from the second key frame set, and a loopback local map is obtained based on the loopback frame and the second key frame.

[0040] The first point cloud frame is registered with the loop closure local map to obtain the loop closure result;

[0041] In response to the loop closure result being successful, the target radar pose is optimized using loop closure constraints to obtain the optimized target radar pose corresponding to the electronic device.

[0042] Secondly, embodiments of this application provide a positioning device applied to an electronic device, the electronic device including a lidar and an inertial measurement unit (IMU), the positioning device including:

[0043] The point cloud acquisition module is used to acquire the first point cloud frame collected by the lidar.

[0044] The IMU data acquisition module is used to acquire multiple frames of IMU data collected by the IMU between a second time and a first time; wherein, the second time is the time when the lidar collects the second point cloud frame, the first time is the time when the lidar collects the first point cloud frame, and the second point cloud frame is a point cloud frame preceding the first point cloud frame.

[0045] The pre-integration module is used to obtain the pre-integration result based on the multi-frame IMU data;

[0046] The initial pose estimation module is used to obtain the initial radar pose corresponding to each laser point in the first point cloud frame based on the pre-integration result.

[0047] The target pose estimation module is used to obtain the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame.

[0048] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the positioning method described in any one of the first aspects above.

[0049] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to implement the positioning method described in any one of the first aspects above.

[0050] Fifthly, embodiments of this application provide a computer program product, which includes a computer program that, when executed on an electronic device, causes the electronic device to implement the positioning method described in any one of the first aspects.

[0051] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 is a schematic diagram of the structure of the electronic device to which the positioning method provided in this application is applicable;

[0054] Figure 2 is a flowchart illustrating a positioning method provided in an embodiment of this application;

[0055] Figure 3 is a schematic diagram of a positioning device provided in an embodiment of this application;

[0056] Figure 4 is a schematic diagram of the structure of the electronic device to which the positioning method provided in this application embodiment is applicable. Detailed Implementation

[0057] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0058] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0059] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0060] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0061] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0062] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0063] With the rapid development of robotics, autonomous driving, AR, and VR, the demand for precise positioning is increasing. SLAM can achieve autonomous navigation and localization. SLAM typically uses LiDAR to acquire point clouds of the surrounding environment for navigation and localization. However, typical SLAM solutions struggle to achieve stable pose estimation when radar observations are insufficient, resulting in poor localization accuracy.

[0064] To address the aforementioned problems, this application provides a positioning method applicable to electronic devices including lidar and IMU. In this method, the electronic device can acquire a first point cloud frame collected by the lidar and multiple frames of IMU data collected by the IMU between a second time point and the first time point. The second time point can be the time when the lidar collects the second point cloud frame, the first time point can be the time when the lidar collects the first point cloud frame, and the second point cloud frame can be a point cloud frame preceding the first point cloud frame. Subsequently, the electronic device can obtain a pre-integration result based on the multiple frames of IMU data, and can obtain the initial radar pose corresponding to each lidar point in the first point cloud frame based on the pre-integration result. Then, the electronic device can obtain the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each lidar point in the first point cloud frame. In other words, this application embodiment can determine the target pose of the electronic device by coupling radar observation with IMU pre-integration, resulting in better robustness when radar observation is insufficient, achieving stable pose estimation, improving the positioning accuracy of the electronic device, and demonstrating strong usability and practicality.

[0065] The positioning method provided in this application can be applied to electronic devices such as robots, mobile phones, tablets, wearable devices, vehicle-mounted devices, AR / VR devices, or laptops. This application does not impose any restrictions on the specific type of electronic device.

[0066] The positioning method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings and specific application scenarios.

[0067] Please refer to Figure 1, which shows a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0068] As shown in Figure 1, the electronic device may include a lidar 110 and an inertial measurement unit (IMU) 120. The lidar 110 can acquire point cloud data (also referred to as point cloud) of the environment surrounding the electronic device, and the point cloud data may contain surface information of objects in the environment. The IMU 120 can acquire data such as the acceleration and angular velocity of the electronic device. The data acquired by the IMU will be referred to as IMU data below.

[0069] Please refer to Figure 2, which shows a schematic flowchart of the positioning method provided in an embodiment of this application. This positioning method can be applied to the electronic device described above, including the lidar 110 and the IMU 120. As shown in Figure 2, the positioning method may include:

[0070] S201, The electronic device acquires the first point cloud frame collected by the lidar.

[0071] When the lidar of an electronic device is in operation, it can collect point clouds of the surrounding environment. For example, the lidar can perform real-time point cloud collection, meaning it can continuously collect point clouds. Alternatively, the lidar can collect point clouds at a pre-set data collection frequency, meaning it can collect point clouds at regular time intervals.

[0072] It should be noted that a point cloud frame can refer to the set of all laser points collected by the LiDAR during a single scan. The scanning time for a single LiDAR scan can be determined based on the actual scenario. For example, the scanning time can be determined to be 0.1 seconds, meaning a point cloud frame can be the set of all laser points scanned by the LiDAR within 0.1 seconds. Similarly, the scanning time can be determined to be 0.2 seconds, meaning a point cloud frame can be the set of all laser points scanned by the LiDAR within 0.2 seconds, and so on.

[0073] For example, the first point cloud frame can be the point cloud frame currently acquired by the lidar, that is, the latest point cloud frame collected by the lidar.

[0074] In some embodiments, after acquiring the first point cloud frame from the lidar, to reduce the impact of redundant points on calculation speed, the electronic device can select one laser point every m laser points as the laser point for subsequent use. That is, the subsequent first point cloud frame can be the point cloud frame corresponding to one laser point selected every m laser points. The value of m can be determined according to the actual scenario, and this embodiment does not limit it.

[0075] S202, The electronic device acquires multiple frames of IMU data collected by the IMU between the second time point and the first time point.

[0076] For example, the second moment can be the moment when the lidar acquires the second point cloud frame, such as the moment when the lidar acquires the second point cloud frame. The first moment can be the moment when the lidar acquires the first point cloud frame, such as the moment when the lidar acquires the first point cloud frame. The second point cloud frame can be a point cloud frame preceding the first point cloud frame, such as the point cloud frame preceding the first point cloud frame.

[0077] It should be noted that a frame of IMU data can refer to a set of data acquired by the IMU in a single data acquisition.

[0078] It should be understood that while the lidar is acquiring point cloud frames, the IMU in the electronic device can also acquire IMU data. The IMU's acquisition frequency can be higher than the lidar's acquisition frequency; that is, while the lidar is acquiring one point cloud frame, the IMU can acquire multiple frames of IMU data.

[0079] In this embodiment of the application, after acquiring the first point cloud frame collected by the lidar, the electronic device can acquire all IMU data between the first point cloud frame and the second point cloud frame, that is, acquire multiple frames of IMU data between the second time corresponding to the second point cloud frame and the first time corresponding to the first point cloud frame.

[0080] S203. The electronic device obtains the pre-integration result based on multiple frames of IMU data.

[0081] In this embodiment, after acquiring multiple frames of IMU data between the second and first time points, the electronic device can determine the pre-integration result based on these frames of IMU data. For example, the pre-integration result between the second and first time points can be determined. The pre-integration result may include position. ,speed and posture Where i can be the first time step, and i-1 can be the second time step.

[0082] It should be understood that the discrete form of the pre-integration result can be expressed as:

[0083] in, The position can be obtained by IMU pre-integration from time i-1 to time k+1. The velocity can be obtained by IMU pre-integration from time i-1 to time k+1. The attitude can be obtained by IMU pre-integration from time i-1 to time k+1. The position can be obtained by IMU pre-integration from time i-1 to time k. The velocity can be obtained by pre-integration of the IMU from time i-1 to time k. The attitude can be obtained through IMU pre-integration from time i-1 to time k. 'a' can be the acceleration acquired by the IMU at time k, 'ω' can be the angular velocity acquired by the IMU at time k, and 'δt' can be the time interval between two consecutive frames of IMU data.

[0084] As can be seen from the above, the pre-integration result (i.e., position) from time i-1 to time k+1 ,speed and posture The result of the pre-integration from time i-1 to time k (i.e., position) can be obtained. ,speed and posture It can be obtained by recursion.

[0085] S204. The electronic equipment obtains the initial radar pose corresponding to each laser point in the first point cloud frame based on the pre-integration result.

[0086] In some embodiments, after obtaining the pre-integration result, the electronic device can obtain the target IMU pose corresponding to each frame of IMU data based on the pre-integration result. The target pose corresponding to each frame of IMU data can be the global pose of the IMU when acquiring that frame of IMU data.

[0087] For example, the electronic device can obtain the target IMU pose corresponding to each frame of IMU data according to the following state recursion formula:

[0088] in, It can be the global position of the IMU at time i, that is, the global position of the IMU when collecting IMU data at time i. This can be the speed of the IMU at time i. This can be the attitude of the IMU at time i. It can be the acceleration bias of the IMU at time i. This can be the angular velocity deviation of the IMU at time i. w It can be gravitational acceleration. This can be the global position of the IMU at time i-1. This can be the speed of the IMU at time i-1. This can be the attitude of the IMU at time i-1. This can be the acceleration deviation of the IMU at time i-1. This can be the angular velocity deviation of the IMU at time i-1.

[0089] It should be understood that when an electronic device moves, all the laser points in a frame of point cloud acquired by the lidar are not scanned at the same time and position, and the reference coordinate systems of each laser point are not consistent, resulting in a certain measurement error in the actual position of a frame of point cloud acquired by the electronic device. To reduce measurement error, the electronic device can unify all the laser points in a frame of point cloud to the same coordinate system.

[0090] In some embodiments, for each laser point in the first point cloud frame, the electronic device can interpolate the laser radar pose (hereinafter referred to as candidate radar pose) by the target IMU pose corresponding to each frame of IMU data and the acquisition time corresponding to the laser point. Subsequently, the electronic device can transform the candidate radar poses corresponding to all laser points to the radar coordinate system corresponding to the first laser point to obtain the initial radar pose corresponding to each laser point, so as to unify all laser points in the first point cloud frame to the same coordinate system and reduce measurement errors.

[0091] The following example uses the nth laser point as an illustration. 0 ≤ n < N, where N can be the number of laser points included in the first point cloud frame.

[0092] The electronic device can acquire the acquisition time corresponding to the nth laser point in the first point cloud frame, and interpolate the candidate radar pose corresponding to the nth laser point based on the acquisition time of the nth laser point and the time corresponding to the pose of each target IMU (i.e., the time when the IMU acquires data from each IMU, hereinafter referred to as time A). Subsequently, the electronic device can obtain the initial radar pose corresponding to the nth laser point based on the candidate radar pose corresponding to the nth laser point and the initial radar pose corresponding to the first laser point. The first laser point can be the laser point with the earliest acquisition time in the first point cloud frame, so as to unify all laser points in the first point cloud frame to the radar coordinate system corresponding to the first laser point. It should be understood that the initial radar pose corresponding to the first laser point can be the candidate radar pose corresponding to the first laser point.

[0093] Suppose that the candidate radar pose corresponding to the nth scan point can be denoted as: It can represent a rotation matrix. It can represent a translation vector. The acquisition time corresponding to the nth scan point is t. n The electronic device can traverse the target IMU pose and find the distance t at time A. n The two most recent target IMU poses. For example, the electronic device can determine the time A and t corresponding to each target IMU pose. n , in t n Find a time before and after the distance t of A. n The most recent target IMU pose. Assume the two target IMU poses found by the electronic device are denoted as follows: The time A corresponding to the poses of the two target IMUs are t and t, respectively. p and t q The electronic device uses the poses of the two target IMUs, the time A corresponding to the poses of the two target IMUs, and the acquisition time t corresponding to the nth scan point. n Determine the candidate radar pose corresponding to the nth scan point. It can be:

[0094] Among them, T IL It can be an external parameter between the lidar and the IMU, and it is a known quantity.

[0095] It should be understood that the electronic device can obtain the candidate radar pose corresponding to the first laser point based on the above formula. The candidate radar pose corresponding to the first laser point can be denoted as: Among them, the candidate radar pose corresponding to the first laser point can be used as the initial radar pose corresponding to the first laser point.

[0096] After obtaining the candidate radar pose corresponding to the nth scanning point The electronic device can transform the candidate radar pose corresponding to the nth scan point to the radar coordinate system corresponding to the first laser point, so as to obtain the initial radar pose corresponding to the nth scan point. That is, the initial radar pose corresponding to the nth scan point can be: p n It can be the pose of the nth scanning point in its own radar coordinate system.

[0097] S205. The electronic device obtains the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame.

[0098] In this embodiment of the application, after obtaining the initial radar pose corresponding to each laser point in the first point cloud frame, the electronic device can obtain the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame. For example, the target radar pose can be the radar pose corresponding to the first point cloud frame, that is, it can be the radar pose of the lidar when acquiring the first point cloud frame.

[0099] In some embodiments, the electronic device can obtain the pre-integration residual based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame. Additionally, the electronic device can obtain the point-area residual based on the first point cloud frame. Subsequently, the electronic device jointly optimizes the error loss function based on the pre-integration residual and the point-area residual to obtain the target radar pose corresponding to the electronic device. That is, the electronic device can incorporate the pre-integration residual and the point-area residual into the error loss function f(X) to jointly optimize the state variable X = [R]. T P T V T B a T B g T ] T This allows us to obtain the target radar pose corresponding to the electronic equipment. R can be the rotation matrix, P can be the position, V can be the velocity, and B... a It can be acceleration deviation, B g It can be the angular velocity deviation.

[0100] For example, the error loss function f(X) can be:

[0101] in, It can be a point-to-surface residual. The pre-integrated residual can be used. C can be the set of scan points in the first point cloud frame. B can be the IMU data between two point cloud frames, for example, it can be multiple frames of IMU data collected by the IMU in S102 between the second time point and the first time point. It can be the j-th scan point at time i. It can be the pre-integration result between two frames of IMU data.

[0102] In one embodiment, the electronic device can determine the pre-integration residual according to the following formula:

[0103] Where, r p This can be the pre-integral residual term corresponding to the position. v This can be the pre-integral residual term corresponding to the velocity. q This can be the pre-integral residual term corresponding to the attitude. ba This can be the pre-integral residual term corresponding to the acceleration deviation. bg This can be the pre-integral residual term corresponding to the angular velocity deviation. [] xyz This can refer to taking the imaginary part of a quaternion. A quaternion can be a representation of the rotational part of a pose, and it can include four variables: w, x, y, and z. w can be the real part of the quaternion, and x, y, and z can be the imaginary part.

[0104] In one embodiment, for each laser point in the first point cloud frame (e.g., the nth laser point), the electronic device can search for matching points in the local map using a K-dimensional tree (Kdtree) to find a predetermined number of laser points (e.g., simply referred to as laser point B) that are closest to the nth laser point, and the distance between laser point B and the nth laser point is less than 1 meter. Subsequently, the electronic device can perform plane fitting on the predetermined number of laser points B, for example, using the least squares method. When the predetermined number of laser points B can form a plane, the electronic device considers the nth laser point to be matched. After determining that the nth laser point is matched, the electronic device can determine the point-to-plane residual corresponding to the nth laser point based on the predetermined number of laser points B. If it is determined that the nth laser point is not matched, the electronic device may not determine the point-to-plane residual corresponding to the nth laser point.

[0105] It should be understood that the preset quantity can be determined according to the actual scenario, and the embodiments of this application do not impose any limitations on this. For example, the preset quantity can be determined to be 5 units according to the actual scenario. For example, the preset quantity can be determined to be 3 units according to the actual scenario. The following will use a preset quantity of 3 units as an example for illustrative explanation.

[0106] For example, the electronic device can determine the point-to-surface residual corresponding to the nth laser point as:

[0107] Where, p i+1,n p can be the nth laser point i,u p i,v and p i,w This can be the three laser points B found in the local map.

[0108] In some embodiments, when the electronic device moves in a plane, the initial plane normal vector and the plane normal vector corresponding to the first point cloud frame (e.g., the first plane normal vector) should be nearly identical. The initial plane normal vector can be the plane normal vector corresponding to the third point cloud frame, which can be the first point cloud frame acquired by the LiDAR. To ensure that the electronic device does not experience altitude drift in large-scale scene mapping, the electronic device can adaptively add planar constraints to the determination of the target radar pose. This ensures that the electronic device does not experience altitude drift in large-scale scene mapping, improving the positioning accuracy and precision of the electronic device in conventional structured scenes, and also realistically reproducing the scene structure in uphill / downhill slope scenes.

[0109] For example, the electronic device can obtain the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector corresponding to the third point cloud frame, and construct plane constraints based on the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector corresponding to the third point cloud frame, so as to optimize the target radar pose based on the plane constraints.

[0110] For example, an electronic device can determine the planar constraint residual based on the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector corresponding to the third point cloud frame, and can put the planar constraint residual into the error loss function f(X) to jointly optimize the state variable X = [R]. T P T V T B a T B g T ] T This allows us to obtain the target radar pose corresponding to the electronic device. At this point, the error loss function f(X) can be:

[0111] Where, r P (X,n i N init ) can be a planar constraint residual.

[0112] Assume that the initial plane normal vector corresponding to the third point cloud frame is N. init =[x inity init z init D init The normal vector of the first plane corresponding to the first point cloud frame is n. i =[x i y i z i D i The target IMU pose at the first moment is: The extrinsic parameter between the lidar and the IMU is T. IL .

[0113] Electronic devices can be based on the target IMU pose The extrinsic parameter T between lidar and IMU IL The initial plane normal vector N init Transform to the IMU coordinate system corresponding to the target IMU pose, i.e., the transformed initial plane normal vector. N local It can be a 4-dimensional vector. Subsequently, the electronic device can use N... local Using the first three dimensions as the basis of the coordinate system, N local Convert to a rotation matrix, and use this rotation matrix to transform the normal vector n of the first plane. i Transform to N local In a coordinate system with the first three dimensions as the basis, the transformed first plane normal vector is obtained, and the plane constraint residual can be determined based on the transformed first plane normal vector.

[0114] Wherein, the transformed first plane normal vector can be n = [x e y e z e D']. Plane constraint residual r P (X,n i N init ) can be: r P (X,n i N init )=[αβd] T ; α=arctan2(y e ,x e ); d=D local -D i ;

[0115] Here, a and β can be used to ensure that the normal vectors of the two planes are consistent, and d can be used to restrict the intercepts of the two planes on the Z-axis to be consistent.

[0116] In one embodiment, when the electronic device travels uphill / downhill, if planar constraints are still added, the roll, pitch, and Z-values ​​in the target radar pose estimation will be constrained to a similar range to the values ​​of the plane (i.e., Roll, Pitch, Z-value), resulting in a large deviation between the constructed map and the actual scene. Therefore, the electronic device can adaptively add planar constraints.

[0117] For example, when the angle between the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector is less than a certain preset threshold (e.g., preset threshold A), the electronic device can add plane constraints to optimize the target radar pose. When the angle between the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector is greater than or equal to the preset threshold A, the electronic device can discard the plane constraints; that is, when optimizing the target radar pose, the electronic device can choose not to add plane constraints. Thus, the error loss function f(X) is:

[0118] Where angle can be the angle between the normal vector of the first plane and the normal vector of the initial plane. θ A preset threshold A can be used. It should be understood that the specific value of the preset threshold A can be determined according to the actual scenario, and this application embodiment does not limit it.

[0119] In some embodiments, for each frame of point cloud, in order to reduce the influence of cluttered points on plane fitting and plane normal vector determination, the electronic device can obtain the installation height H of the lidar, and can obtain the target point cloud from the frame of point cloud based on the installation height H, so as to perform plane fitting and plane normal vector determination based on the target point cloud.

[0120] For example, after acquiring the first point cloud frame, the electronic device can obtain the target point cloud from the first point cloud frame based on the installation height H of the lidar, fit a point cloud plane (e.g., plane A) based on the target point cloud, and obtain the plane normal vector (i.e., the first plane normal vector) corresponding to plane A.

[0121] Similarly, after acquiring the third point cloud frame (i.e. the first point cloud frame acquired by the lidar), the electronic device can obtain the target point cloud from the third point cloud frame according to the installation height H of the lidar, fit a point cloud plane (e.g., plane B) according to the target point cloud, and obtain the plane normal vector (i.e. the initial plane normal vector) corresponding to plane B.

[0122] For example, the target point cloud may include laser points with a height less than or equal to H / 3. That is, for each frame of the point cloud, the electronic device can filter out all laser points with a height greater than H / 3, and can use the remaining laser points to perform plane fitting and determine the plane normal vector.

[0123] It should be noted that the embodiments of this application do not limit the specific method of plane fitting for the electronic device or the specific method of determining the plane normal vector (e.g., the first plane normal vector or the initial plane normal vector, etc.) of the electronic device, and can be determined according to the actual scenario. For example, the electronic device can fit the plane using the random sample consensus (RANSACN) algorithm.

[0124] In some embodiments, after determining the target radar pose corresponding to the electronic device, the electronic device can determine whether the current point cloud frame (i.e., the first point cloud frame) is a keyframe based on the rotation increment Δp and translation increment Δt corresponding to the target radar pose. When the first point cloud frame is determined to be a keyframe, the electronic device can put the first point cloud frame and the target radar pose corresponding to the first point cloud frame into the keyframe set kfs. G middle.

[0125] For example, when the rotation increment Δp corresponding to the target radar pose is greater than a certain preset threshold (e.g., preset threshold B), or the translation increment Δt is greater than a certain preset threshold (e.g., preset threshold C), the electronic equipment can determine the first point cloud frame as a key frame. Otherwise, the electronic equipment can determine the first point cloud frame as a non-key frame.

[0126] It should be noted that the specific values ​​of the preset threshold B and preset threshold C can be determined according to the actual scenario, and this application embodiment does not impose any restrictions on this.

[0127] In some embodiments, for each laser point in the first point cloud frame, after determining the initial radar pose corresponding to the laser point, the electronic device can, based on the key frame set kfs G The initial radar pose corresponding to the laser point is optimized to improve the accuracy of the initial radar pose. This allows the electronic device to determine the target radar pose corresponding to the electronic device based on the initial radar pose with higher accuracy, thereby improving the accuracy of the target radar pose.

[0128] The following example uses the nth laser point as an illustration.

[0129] That is, after determining the initial radar pose corresponding to the nth laser point, the electronic device can determine the first keyframe set corresponding to the nth laser point based on the initial radar pose, and obtain the first local map corresponding to the first keyframe set based on each keyframe in the first keyframe set. Subsequently, the electronic device can optimize the initial radar pose corresponding to the nth laser point based on the first local map to obtain the optimized initial radar pose corresponding to the nth laser point.

[0130] For example, the electronic device can use the initial radar pose corresponding to the nth laser point as the center, and r as the radius. k The search radius is kfs within the keyframe set. G In the process, a keyframe search is performed to obtain the set of neighboring keyframes kfs corresponding to the nth laser point. L (i.e., the first set of keyframes). The set of neighboring keyframes (kfs) L The distance between the pose corresponding to each keyframe and the candidate radar pose corresponding to the nth laser point can be less than or equal to r. k Subsequently, the electronic device can set the nearest keyframe set (kfs). L The keyframes in the image are merged to form a first local map. The initial radar pose corresponding to the nth laser point can be optimized based on the first local map to obtain the optimized initial radar pose corresponding to the nth laser point.

[0131] It should be noted that r k The value of can be determined according to the actual scenario, and the embodiments of this application do not impose any restrictions on it.

[0132] It should be understood that when an electronic device runs multiple times in a region, it will generate a large number of similar keyframes. To avoid the large amount of data affecting the operation of electronic devices with limited computing resources, the electronic device can use an adaptive sampling strategy to perform a kfs (keyframe search) of the nearest keyframe set. L Maintaining the size within a stable range allows the positioning algorithm to run in real time on electronic devices with limited computing resources, reducing the possibility of pose estimation failure due to excessive pose data during the construction of large outdoor scene maps.

[0133] For example, an adaptive sampling strategy can be as follows:

[0134] Among them, kfs L .size() can be a set of neighboring keyframes, kfs. L The number of keyframes in the data, kf θ kfs for neighboring keyframes L The threshold for the number of keyframes, pf is the set of nearest keyframes kfs L The downsampling value.

[0135] In this embodiment, the aforementioned positioning method can achieve efficient, real-time, and relatively accurate estimation of the target radar pose. However, due to radar measurement errors and / or odometry estimation errors, after long-term operation in large outdoor scenes, the pose of the electronic device will still deviate from the pose in the real environment. In some embodiments, after determining the target radar pose corresponding to the electronic device, the electronic device can further correct the target radar pose through backend optimization to obtain a more accurate radar pose and improve the accuracy of pose determination.

[0136] In one embodiment, the electronic device can continuously monitor the loopback at a low frequency via a process module. When the loopback is successful, the electronic device can optimize the target radar pose using loopback constraints. When the loopback fails, the electronic device can optimize the target radar pose without using loopback constraints.

[0137] For example, after obtaining the target radar pose corresponding to the electronic device, the electronic device can determine whether the first point cloud frame is a keyframe based on the target radar pose. When the first point cloud frame is determined to be a keyframe, the electronic device can obtain the second set of keyframes corresponding to the first point cloud frame based on the target radar pose, and obtain the loop-through frame based on the first point cloud frame and the second set of keyframes. Subsequently, the electronic device can obtain the second keyframe from the second set of keyframes based on the loop-through frame, and obtain the loop-through local map based on the loop-through frame and the second keyframe. Then, the electronic device can register the first point cloud frame with the loop-through local map to obtain the loop-through result.

[0138] When the loop closure result is successful, the electronic device can use the loop closure constraint to optimize the target radar pose, obtaining the optimized target radar pose corresponding to the electronic device. When the loop closure result is unsuccessful, the electronic device can optimize the target radar pose without using the loop closure constraint.

[0139] It should be noted that the specific steps for the electronic device to determine whether the first point cloud frame is a keyframe can be found in the aforementioned content on determining whether the first point cloud frame is a keyframe, and will not be repeated here.

[0140] In one embodiment, after determining the first point cloud frame as a keyframe, the electronic device can perform keyframe set kfs G In the middle, with the target radar pose corresponding to the first point cloud frame as the center, and r as the radius, the distance from the target radar pose to the first point cloud frame is calculated. l Using the search radius, perform a keyframe search to obtain the set of neighboring keyframes, kfl. L (i.e., the second set of keyframes). The set of neighboring keyframes, kfl. L The distance between the pose corresponding to each keyframe and the target radar pose can be less than or equal to r. l .

[0141] After obtaining the set of neighboring keyframes kfl L Then, the electronic device can determine the set of neighboring keyframes, kfl. L The difference between the acquisition time corresponding to each keyframe (i.e., the time when the LiDAR acquires the keyframe) and the acquisition time corresponding to the first point cloud frame. When a certain keyframe L... k When the difference between the corresponding acquisition time and the acquisition time corresponding to the first point cloud frame is greater than a preset time threshold, the electronic device can consider it a key frame L. k It could be a loopback frame, in which case the electronic device can retrieve the data from the nearest set of keyframes (kfl). L In the process, obtain keyframe L k The keyframes of the preceding and following s frames (i.e., the second keyframe), and the keyframe L can be... k The second keyframe forms a loop-loop local map, which means that {L k-s … L k … L k+s The first point cloud frame is then used to construct a loopback local map. The electronic device can then register the first point cloud frame with the loopback local map, for example, using iterative closest point registration (ICP), to obtain the loopback result. When the matching score is less than a preset threshold (e.g., preset threshold D), the loopback result is considered successful. When the matching score is greater than or equal to the preset threshold D, the loopback result is considered unsuccessful. In the case of successful loopback, the electronic device can optimize the target radar pose corresponding to the first point cloud frame using loopback constraints.

[0142] It should be understood that the value of the preset threshold D can be determined according to the actual scenario, and the embodiments of this application do not impose any restrictions on it.

[0143] For example, to ensure the smoothness of pose estimation, when optimizing the target radar pose corresponding to the first point cloud frame using loop closure constraints, the electronic device can also add inter-frame odometry constraints to optimize the target radar pose together. In this case, the optimization error function F(X) can be:

[0144] in, It can be used for inter-frame odometry constraints. This can be used as a closure constraint. ΔT i-1,i It can be the relative radar pose of the (i-1)th point cloud frame and the i-th point cloud frame. For the (i-1)th point cloud frame, T can be the radar pose. i It can be the radar pose corresponding to the i-th point cloud frame.

[0145] As can be seen from the above, electronic devices can solve the problem of poor map consistency caused by pose deviation due to algorithm accumulation errors when running in large outdoor scenes through loop closure monitoring mechanisms and backend optimization methods. This allows for efficient, real-time, and robust construction of scene-consistent maps.

[0146] In this embodiment, the electronic device can acquire a first point cloud frame collected by the lidar and multiple frames of IMU data collected by the IMU between a second time point and a first time point. The second time point can be the time when the lidar collects the second point cloud frame, the first time point can be the time when the lidar collects the first point cloud frame, and the second point cloud frame can be a point cloud frame preceding the first point cloud frame. Subsequently, the electronic device can obtain a pre-integration result based on the multiple frames of IMU data, and can obtain the initial radar pose corresponding to each lidar point in the first point cloud frame based on the pre-integration result. Then, the electronic device can obtain the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each lidar point in the first point cloud frame. That is, this embodiment can determine the target pose of the electronic device by coupling radar observation with IMU pre-integration, which makes it more robust when radar observation is insufficient, so as to achieve stable pose estimation and improve the positioning accuracy of the electronic device.

[0147] It should be understood that the sequence number of each step in the above embodiments does not imply 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 this application.

[0148] Corresponding to the positioning method described in the above embodiments, Figure 3 shows a structural block diagram of the positioning device provided in this application embodiment. For ease of explanation, only the parts related to this application embodiment are shown. This positioning device can be applied to the aforementioned electronic devices, that is, to electronic devices including lidar and IMU. As shown in Figure 3, the positioning device may include:

[0149] Point cloud acquisition module 301 is used to acquire the first point cloud frame collected by the lidar;

[0150] IMU data acquisition module 302 is used to acquire multiple frames of IMU data collected by the IMU between a second time and a first time; wherein, the second time is the time when the lidar collects the second point cloud frame, the first time is the time when the lidar collects the first point cloud frame, and the second point cloud frame is a point cloud frame before the first point cloud frame.

[0151] The pre-integration module 303 is used to obtain the pre-integration result based on the multi-frame IMU data;

[0152] The initial pose estimation module 304 is used to obtain the initial radar pose corresponding to each laser point in the first point cloud frame based on the pre-integration result.

[0153] The target pose estimation module 305 is used to obtain the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame.

[0154] In some embodiments, the initial pose estimation module 304 is specifically used to obtain the target IMU pose corresponding to each frame of IMU data based on the pre-integration result; obtain the acquisition time corresponding to the nth laser point in the first point cloud frame; 0≤n<N, where N is the number of laser points included in the first point cloud frame; obtain the candidate radar pose corresponding to the nth laser point based on the acquisition time corresponding to the nth laser point and the poses of each target IMU; and obtain the initial radar pose corresponding to the nth laser point based on the candidate radar pose corresponding to the nth laser point and the initial radar pose corresponding to the first laser point.

[0155] Wherein, the first laser point is the laser point with the earliest acquisition time in the first point cloud frame; the initial radar pose corresponding to the first laser point is the candidate radar pose corresponding to the first laser point.

[0156] In some embodiments, the positioning device may further include:

[0157] The first optimization module is used to obtain a first keyframe set corresponding to the nth laser point based on the initial radar pose corresponding to the nth laser point; obtain a first local map corresponding to the first keyframe set based on each keyframe in the first keyframe set; and optimize the initial radar pose corresponding to the nth laser point based on the first local map to obtain the optimized initial radar pose corresponding to the nth laser point.

[0158] The target pose estimation module 305 is further configured to obtain the target radar pose corresponding to the electronic device based on the pre-integration result and the optimized initial radar pose corresponding to each laser point in the first point cloud frame.

[0159] In some embodiments, the positioning device may further include:

[0160] The planar residual determination module is used to obtain the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector corresponding to the third point cloud frame; the third point cloud frame is the first point cloud frame acquired by the lidar; in response to the angle between the first plane normal vector and the initial plane normal vector being less than a preset threshold, the planar constraint residual is obtained based on the first plane normal vector and the initial plane normal vector.

[0161] The target pose estimation module 305 is further configured to obtain the target radar pose corresponding to the electronic device based on the planar constraint residual, the pre-integration result, and the initial radar pose corresponding to each laser point of the first point cloud frame.

[0162] In one embodiment, the target pose estimation module 305 is further configured to obtain a pre-integration residual based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame; obtain a point-to-surface residual based on the first point cloud frame; and jointly optimize the error loss function based on the planar constraint residual, the pre-integration residual, and the point-to-surface residual to obtain the target radar pose corresponding to the electronic device.

[0163] In one embodiment, the planar residual determination module is further configured to obtain the installation height of the lidar; obtain a target laser point from the first point cloud frame based on the installation height; fit a point cloud plane based on the target laser point, and obtain a first plane normal vector corresponding to the point cloud plane.

[0164] In some embodiments, the positioning device may further include:

[0165] The second optimization module is configured to: respond to the first point cloud frame being a key frame; obtain a second set of key frames corresponding to the first point cloud frame based on the target radar pose; obtain a loop-through frame based on the first point cloud frame and the second set of key frames; obtain a second key frame from the second set of key frames based on the loop-through frame; obtain a loop-through local map based on the loop-through frame and the second key frame; register the first point cloud frame with the loop-through local map to obtain a loop-through result; and, responding to the loop-through result being a successful loop-through, optimize the target radar pose using loop-through constraints to obtain the optimized target radar pose corresponding to the electronic device.

[0166] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0167] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to 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 embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0168] Figure 4 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in Figure 4, the electronic device 4 of this embodiment includes: a lidar 43, an IMU 44, at least one processor 40 (only one is shown in Figure 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40. The lidar 43 is used to collect point clouds of the environment surrounding the electronic device. The IMU 44 is used to acquire IMU data such as acceleration and angular velocity of the electronic device. When the processor 40 executes the computer program 42, it implements the steps in any of the above-described positioning method embodiments.

[0169] The electronic device 4 can be a robot, mobile phone, tablet computer, wearable device, in-vehicle device, AR / VR device, or laptop computer. This electronic device may include, but is not limited to, a LiDAR 43, an IMU 44, a processor 40, and a memory 41. Those skilled in the art will understand that Figure 4 is merely an example of the electronic device 4 and does not constitute a limitation on the electronic device 4. It may include more or fewer components than illustrated, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0170] The processor 40 can be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0171] In some embodiments, the memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. In other embodiments, the memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 4. Further, the memory 41 may include both internal storage units and external storage devices of the electronic device 4. The memory 41 is used to store operating systems, applications, bootloaders, data, and other programs, such as the program code of the computer program. The memory 41 can also be used to temporarily store data that has been output or will be output.

[0172] This application also provides a computer-readable storage medium storing a computer program that, when executed by an electronic device, causes the electronic device to perform the steps described in the above-described positioning method embodiments.

[0173] This application provides a computer program product, which includes a computer program that, when executed on an electronic device, causes the electronic device to perform the steps described in the various positioning method embodiments above.

[0174] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include at least: any entity or device capable of carrying computer program code to a device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable storage media cannot be electrical carrier signals or telecommunication signals.

[0175] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0176] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0177] In the embodiments provided in this application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0178] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0179] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A positioning method, characterized in that, The positioning method is applied to an electronic device, which includes a lidar and an inertial measurement unit (IMU), and includes: Obtain the first point cloud frame acquired by the lidar; Acquire multiple frames of IMU data between the second time point and the first time point; wherein, the second time point is the time when the lidar acquires the second point cloud frame, the first time point is the time when the lidar acquires the first point cloud frame, and the second point cloud frame is a point cloud frame preceding the first point cloud frame; Based on the multi-frame IMU data, the pre-integration result is obtained; Based on the pre-integration results, the initial radar pose corresponding to each laser point in the first point cloud frame is obtained; Based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame, the target radar pose corresponding to the electronic device is obtained.

2. The positioning method according to claim 1, characterized in that, The step of obtaining the initial radar pose corresponding to each laser point in the first point cloud frame based on the pre-integration result includes: Based on the pre-integration results, the target IMU pose corresponding to each frame of IMU data is obtained; Obtain the acquisition time corresponding to the nth laser point in the first point cloud frame; 0≤n<N, where N is the number of laser points included in the first point cloud frame; Based on the acquisition time corresponding to the nth laser point and the pose of each target IMU, the candidate radar pose corresponding to the nth laser point is obtained; The initial radar pose corresponding to the nth laser point is obtained based on the candidate radar pose corresponding to the nth laser point and the initial radar pose corresponding to the first laser point; wherein, the first laser point is the laser point with the earliest acquisition time in the first point cloud frame; the initial radar pose corresponding to the first laser point is the candidate radar pose corresponding to the first laser point.

3. The positioning method according to claim 2, characterized in that, After obtaining the initial radar pose corresponding to the nth laser point based on the candidate radar pose corresponding to the nth laser point and the initial radar pose corresponding to the first laser point, the localization method further includes: Based on the initial radar pose corresponding to the nth laser point, the first keyframe set corresponding to the nth laser point is obtained; Based on each keyframe in the first keyframe set, a first local map corresponding to the first keyframe set is obtained; Based on the first local map, the initial radar pose corresponding to the nth laser point is optimized to obtain the optimized initial radar pose corresponding to the nth laser point. The step of obtaining the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame includes: Based on the pre-integration result and the optimized initial radar pose corresponding to each laser point in the first point cloud frame, the target radar pose corresponding to the electronic device is obtained.

4. The positioning method according to claim 1, characterized in that, The positioning method further includes: Obtain the first plane normal vector corresponding to the first point cloud frame and the initial plane normal vector corresponding to the third point cloud frame; the third point cloud frame is the first point cloud frame acquired by the lidar. In response to the angle between the first plane normal vector and the initial plane normal vector being less than a preset threshold, the plane constraint residual is obtained based on the first plane normal vector and the initial plane normal vector; The step of obtaining the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame includes: Based on the planar constraint residual, the pre-integration result, and the initial radar pose corresponding to each laser point in the first point cloud frame, the target radar pose corresponding to the electronic device is obtained.

5. The positioning method according to claim 4, characterized in that, The step of obtaining the target radar pose corresponding to the electronic device based on the planar constraint residual, the pre-integration result, and the initial radar pose corresponding to each laser point in the first point cloud frame includes: Based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame, the pre-integration residual is obtained. Based on the first point cloud frame, the point-to-surface residual is obtained; Based on the planar constraint residual, the pre-integration residual, and the point-to-surface residual, the error loss function is jointly optimized to obtain the target radar pose corresponding to the electronic device.

6. The positioning method according to claim 4, characterized in that, The step of obtaining the first plane normal vector corresponding to the first point cloud frame includes: Obtain the installation height of the lidar; Based on the installation height, the target laser point is obtained from the first point cloud frame; Fit a point cloud plane based on the target laser point, and obtain the first plane normal vector corresponding to the point cloud plane.

7. The positioning method according to any one of claims 1 to 6, characterized in that, After obtaining the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame, the positioning method further includes: In response to the first point cloud frame being a key frame, a second set of key frames corresponding to the first point cloud frame is obtained based on the target radar pose. Based on the first point cloud frame and the second key frame set, obtain the loopback frame; Based on the loopback frame, a second key frame is obtained from the second key frame set, and a loopback local map is obtained based on the loopback frame and the second key frame. The first point cloud frame is registered with the loop closure local map to obtain the loop closure result; In response to the loop closure result being successful, the target radar pose is optimized using loop closure constraints to obtain the optimized target radar pose corresponding to the electronic device.

8. A positioning device, characterized in that, The positioning device is applied to an electronic device, which includes a lidar and an inertial measurement unit (IMU), and includes: The point cloud acquisition module is used to acquire the first point cloud frame collected by the lidar. The IMU data acquisition module is used to acquire multiple frames of IMU data collected by the IMU between a second time and a first time; wherein, the second time is the time when the lidar collects the second point cloud frame, the first time is the time when the lidar collects the first point cloud frame, and the second point cloud frame is a point cloud frame preceding the first point cloud frame. The pre-integration module is used to obtain the pre-integration result based on the multi-frame IMU data; The initial pose estimation module is used to obtain the initial radar pose corresponding to each laser point in the first point cloud frame based on the pre-integration result. The target pose estimation module is used to obtain the target radar pose corresponding to the electronic device based on the pre-integration result and the initial radar pose corresponding to each laser point in the first point cloud frame.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic device to implement the positioning method as described in any one of claims 1 to 7.

10. A computer program product, the computer program product comprising a computer program, characterized in that, When the computer program is executed on the electronic device, it causes the electronic device to implement the positioning method as described in any one of claims 1 to 7.