Pose localization methods, devices, computer equipment, and storage media
By combining the current and historical global and local poses, the target parameters are determined and the local pose is transformed to the global coordinate system. This solves the problem of low accuracy in traditional positioning methods and achieves higher accuracy and smoother positioning results.
Patent Information
- Application Number
- CN202210739950.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-06-28
AI Technical Summary
Existing positioning methods suffer from low positioning accuracy due to factors such as sensor acquisition errors, environmental map construction errors, and feature point matching errors, resulting in problems such as position jumps and uneven trajectories.
By acquiring the current global and local poses at the current moment, and combining them with the poses at historical moments, a pose set of displacement differences is determined. This set is then used to determine target parameters, such as rotation matrix, scale, and translation vector. The current local pose is then transformed to the global coordinate system, and the global and local poses are fused to improve accuracy.
While ensuring global accuracy, the high precision of local pose and trajectory smoothness are combined to improve positioning accuracy and solve the problem of low accuracy in traditional methods.
Smart Images

Figure CN115035190B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a pose localization method, apparatus, computer device, and storage medium. Background Technology
[0002] The technology of using visual sensors to achieve localization in unknown environments (without any prior information) has been widely applied to many needs in fields such as robotics, autonomous driving, and virtual reality.
[0003] The commonly used localization method currently is to construct an environmental map based on Simultaneous Localization and Mapping (SLAM) technology, and then extract feature points and descriptors from the environmental map. During localization, based on the current frame acquired by the sensor at the current location, the feature points and descriptors of the current frame are extracted and matched with the feature points and descriptors extracted from the environmental map to determine the global pose of the current frame in the environmental map.
[0004] However, current positioning methods suffer from significant errors due to factors such as sensor acquisition errors, environmental map construction errors, and feature point matching errors. As a result, the calculated global pose of the current frame in the map has large errors, leading to problems such as position jumps and uneven trajectories, resulting in low positioning accuracy. Summary of the Invention
[0005] Therefore, it is necessary to provide a pose positioning method, device, computer equipment, and storage medium that can improve positioning accuracy in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a pose localization method. The method includes:
[0007] Obtain the current pose at the current moment, where the current pose includes the current global pose and the current local pose;
[0008] Based on the current pose and the historical poses of previous times, determine the set of poses with displacement differences;
[0009] Based on the pose set, the target parameters of the current local pose relative to the current global pose are determined, wherein the target parameters include a first rotation matrix, a first scale, and a first translation vector;
[0010] The target global pose at the current moment is determined based on the current local pose, the first rotation matrix, the first translation vector, and the first scale.
[0011] Secondly, this application also provides a pose positioning device. The device includes:
[0012] The acquisition module is used to acquire the current pose at the current moment, where the current pose includes the current global pose and the current local pose;
[0013] The first determining module is used to determine a set of poses with displacement differences based on the current pose and the historical poses of historical moments before the current moment.
[0014] The second determining module is used to determine the target parameters of the current local pose relative to the current global pose based on the pose set, wherein the target parameters include a first rotation matrix, a first scale, and a first translation vector;
[0015] The third determination module is used to determine the target global pose at the current moment based on the current local pose, the first rotation matrix, the first translation vector, and the first scale.
[0016] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of any of the methods described above.
[0017] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0018] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of any of the methods described above.
[0019] The aforementioned pose localization method, apparatus, computer device, and storage medium acquire the current global pose and current local pose at the current moment. Based on the current pose and historical poses from previous moments, a set of poses with displacement differences is determined. Then, based on this set of poses, target parameters of the current local pose relative to the current global pose are determined. These target parameters include a first rotation matrix, a first scale, and a first translation vector. Therefore, based on the current local pose, the first rotation matrix, the first translation vector, and the first scale, the target global pose at the current moment is determined. In other words, the pose localization method provided in this application combines the global and local poses at the current and historical moments, determines the first rotation matrix, the first scale, and the first translation vector of the local pose relative to the global pose, and uses these determined first rotation matrix, first scale, and first translation vector to transform the current local pose to the global coordinate system, thereby obtaining the target global pose at the current moment. By fusing global and local poses, the fused global pose is achieved while also incorporating the advantages of high accuracy and smooth trajectory of local poses in a short time. Therefore, the fused global pose obtained by transforming the current local pose to the global coordinate system has higher accuracy. Thus, this application solves the problem of low accuracy inherent in traditional techniques that directly use global poses. Attached Figure Description
[0020] Figure 1 This is a diagram illustrating the application environment of the pose localization method in the embodiments of this application.
[0021] Figure 2 This is a flowchart illustrating the pose localization method in an embodiment of this application.
[0022] Figure 3 This is a schematic diagram of a process for determining a pose set in an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of another process for determining a pose set in an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of a process for determining a first rotation matrix in an embodiment of this application;
[0025] Figure 6 This is a schematic diagram of a process for determining the difference between a rotation vector and other rotation vectors in an embodiment of this application;
[0026] Figure 7 This is a schematic diagram of a process for determining a first scale in an embodiment of this application;
[0027] Figure 8 This is a schematic diagram of another process for determining the first scale in an embodiment of this application;
[0028] Figure 9 This is a schematic diagram of a process for determining an intermediate scale set in an embodiment of this application;
[0029] Figure 10 This is a schematic diagram of a process for determining a target translation vector in an embodiment of this application;
[0030] Figure 11 This is a schematic diagram of a process for determining the global pose of a target in an embodiment of this application;
[0031] Figure 12 This is an overall schematic diagram of the pose positioning method in the embodiments of this application;
[0032] Figure 13 This is a magnified view of the output trajectory.
[0033] Figure 14 This is a structural block diagram of the pose positioning device in the embodiments of this application;
[0034] Figure 15 This is a diagram showing the internal structure of a computer device in an embodiment of this application. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0036] Traditional localization methods typically involve constructing an environmental map based on Simultaneous Localization and Mapping (SLAM) technology and extracting feature points and descriptors from the environmental map. During localization, feature points and descriptors of the current frame are extracted from the sensor at the current location and matched with feature points and descriptors extracted from the environmental map to determine the global pose of the current frame within the environmental map.
[0037] Some methods also propose that when feature point matching with descriptor fails, a relative pose transformation matrix is calculated using SLAM, wheel velocity measurement, or inertial measurement unit (IMU) to obtain local positioning information. Based on the transformation relationship between the local and global coordinate systems, this local positioning information is converted into global positioning information, thus determining the global positioning of the current frame in the map when feature point matching with descriptor fails. When feature point matching with descriptor succeeds again, the global pose of the current frame in the environment map is still determined based on the matching result.
[0038] However, on the one hand, current positioning methods suffer from significant errors in global pose calculations for the current frame due to factors such as sensor acquisition errors, environmental map construction errors, and feature point matching errors. This results in problems like position jumps and uneven trajectories, leading to low positioning accuracy. On the other hand, when feature point matching with descriptors fails in the current frame, local positioning information is more accurate and the trajectory smoother for a short period compared to global positioning information. However, when feature point matching with descriptors succeeds again in the next frame, the directly acquired global positioning information differs from the indirectly obtained global positioning information using local positioning. In other words, the positioning methods for the current frame and the next frame are different, which also causes trajectory jumps, poor smoothness, and low accuracy.
[0039] Therefore, it is necessary to provide a pose positioning method that can improve positioning accuracy in response to the above-mentioned technical problems.
[0040] Figure 1 This diagram illustrates the application environment of the pose localization method in this application. The pose localization method provided in this application can be applied to, for example... Figure 1 In the application environment shown, mobile device 102 is electrically connected to computer device 104. Mobile device 102 can be a mobile vehicle, mobile robot, drone, etc. Data storage system can store the data that computer device 104 needs to process. Data storage system can be integrated on computer device 104 or placed in the cloud or other network servers. Computer device 104 can be a central processing unit (CPU), and can also include digital signal processors (DSP), field-programmable gate arrays (FPGA), or other programmable logic devices. Computer device 104 can also be a server, implemented using a standalone server or a server cluster composed of multiple servers. Of course, computer device 104 can also be a terminal, such as various personal computers, laptops, smartphones, tablets, and portable wearable devices. IoT devices can be smart vehicle devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc.
[0041] Figure 2 This is a flowchart illustrating the pose localization method in an embodiment of this application. This method can be applied to... Figure 1 In one embodiment of the computer device shown, such as Figure 2 As shown, it includes the following steps:
[0042] S201, obtain the current pose at the current moment, where the current pose includes the current global pose and the current local pose.
[0043] In this embodiment, the global coordinate system is defined as W, the local coordinate system as C0, and the camera coordinate system at time t as Ct. The global coordinate system is the coordinate system of the environment map, the local coordinate system is the coordinate system of SLAM, and the camera coordinate system is the coordinate system of the vision sensor. As shown in equation (1), the transformation matrix... This represents the pose transformation from coordinate system a to coordinate system b.
[0044]
[0045] in, and Let represent the rotation matrix and translation vector from coordinate system a to coordinate system b, respectively. It can be understood that one coordinate system can be transformed to another using a rotation matrix and a translation vector.
[0046] Furthermore, the computer device acquires the pose transformation matrix at the current time t, calculated using SLAM. (i.e., the current local pose), and the pose transformation matrix obtained from global localization are: (i.e., the current global pose). It should be noted that the current local pose... Including rotation matrix Translation vector Current global pose Including rotation matrix Translation vector
[0047] S202, determine the set of poses with displacement differences based on the current pose and the historical poses of historical moments before the current moment.
[0048] In this embodiment, the computer device determines a set of poses with displacement differences based on the current pose and the historical poses from previous times. One possible approach is for the computer device to iterate from the current time t towards previous times to determine a set of historical poses with displacement differences from the current pose. It is understood that historical poses include historical global poses and historical local poses. Therefore, the pose set includes a historical global pose set and a historical local pose set.
[0049] S203, based on the pose set, determine the target parameters of the current local pose relative to the current global pose, wherein the target parameters include the first rotation matrix, the first scale, and the first translation vector.
[0050] In this embodiment, the transformation matrix from the local coordinate system to the global coordinate system at time t is... It satisfies the following equation (2).
[0051]
[0052] Theoretically, it is constant at different times, but due to the existence of errors, The calculated values are not the same at each time step. Therefore, in this application, the computer device needs to determine more accurate and robust target parameters based on the pose set. These target parameters include a first rotation matrix, a first scale, and a first translation vector. It can be understood that the target parameters are parameters of the local coordinate system relative to the global coordinate system, that is, parameters of the current local pose relative to the current global pose.
[0053] S204. Determine the target global pose at the current moment based on the current local pose, the first rotation matrix, the first translation vector, and the first scale.
[0054] In this embodiment, the computer device determines the location based on the current local pose. First rotation matrix First translation vector and the first scale S g To determine the target's global pose at the current moment, one possible approach is for the computer device to determine the target's global pose T at the current moment according to the following equation (3). g .
[0055]
[0056] Among them, the current local pose Including rotation matrix Translation vector The target global pose T at the current moment g Including rotation matrix R g Translation vector t g .
[0057] The pose localization method provided in this application embodiment obtains the current pose at the current moment, wherein the current pose includes the current global pose and the current local pose. Based on the current pose and historical poses from previous moments, a set of poses with displacement differences is determined. Then, based on the pose set, a first rotation matrix, a first scale, and a first translation vector of the current local pose relative to the current global pose are determined. Finally, based on the current local pose, the first rotation matrix, the first translation vector, and the first scale, the target global pose at the current moment is determined. In other words, the pose localization method provided in this application combines the global and local poses at the current and historical moments, determines the first rotation matrix, the first scale, and the first translation vector of the local pose relative to the global pose, and uses the determined first rotation matrix, the first scale, and the first translation vector to transform the current local pose to the global coordinate system, thereby obtaining the target global pose at the current moment. By fusing global and local poses, the fused global pose is achieved while also incorporating the advantages of high accuracy and smooth trajectory of local poses within a short timeframe. Therefore, the fused global pose obtained by transforming the current local pose to the global coordinate system has higher accuracy. Thus, this application solves the problem of low accuracy inherent in traditional techniques that directly use global poses.
[0058] Figure 3 This is a flowchart illustrating a process for determining a pose set in an embodiment of this application. (Refer to...) Figure 3 This embodiment relates to an optional implementation of how to determine the pose set. Based on the above embodiment, S202 includes the following steps:
[0059] S301, determine the global pose difference between the current global pose and the historical global poses in each historical pose.
[0060] In this embodiment, there are multiple historical poses. The computer device determines the current global pose. With the global historical position in each historical position Global pose difference δ between i As shown in equation (4).
[0061]
[0062] in, Current global pose The translation vector, The historical global pose at time ti The translation vector. i is an integer greater than 0 and less than t.
[0063] For example, if the current time t=3, the computer device will iterate through historical times to determine the current global pose at t=3. Historical global pose with t=2 Global pose difference between And the computer equipment determines the current global pose at t=3. Historical global pose with t=1 Global pose difference between
[0064] S302, determine the local pose difference between the current local pose and the historical local poses in each historical pose.
[0065] In this embodiment, the computer device determines the current local pose. Historical local poses in each historical pose Local pose difference ε between i As shown in equation (5).
[0066]
[0067] in, For the current local pose The translation vector, For the historical local pose at time ti The translation vector is denoted by t. i is an integer greater than 0 and less than t. The principle for determining the local pose difference is the same as in S301, and will not be repeated here.
[0068] S303, determine the pose set based on the global pose difference and local pose difference corresponding to each historical pose.
[0069] In this embodiment, the computer device determines the pose set based on the global pose difference and local pose difference corresponding to each historical pose. One possible implementation is that the computer device uses the global pose difference δ i and local pose difference ε i The historical global pose and historical local pose corresponding to all values greater than 0 are used as the pose set.
[0070] In this embodiment, the global pose difference between the current global pose and the historical global poses in each historical pose is determined, and the local pose difference between the current local pose and the historical local poses in each historical pose is also determined. Therefore, a pose set is determined based on the global pose difference and the local pose difference corresponding to each historical pose. Since the pose set is determined based on the global pose difference and the local pose difference corresponding to each historical pose, a pose set with displacement differences can be determined. This allows the target parameters of the current local pose relative to the current global pose to be determined based on the pose set, thereby improving the accuracy of positioning.
[0071] In this embodiment, the pose set includes the historical global pose set, the historical local pose set, and the relative pose set. Figure 4 This is a schematic diagram of another process for determining a pose set in an embodiment of this application. (Refer to...) Figure 4 This embodiment relates to an optional implementation of how to determine the pose set. Based on the above embodiment, S303 includes the following steps:
[0072] S401, from each historical pose, determine the target historical pose where the global pose difference is greater than a preset global pose difference threshold and the local pose difference is greater than a preset local pose difference threshold.
[0073] In this embodiment, the computer device traverses from the current time t to the historical time ti to determine the global pose difference δ. i The local pose difference is greater than the preset global pose difference threshold δ and the local pose difference ε i The target historical pose is greater than the preset local pose difference threshold ε.
[0074] For example, the computer device presets the number of target historical poses to be N. For instance, if N = 2, the computer device needs to determine 2 target historical poses. At the current time t = 5, the computer device iterates through the historical time points in reverse chronological order until the global pose difference δ is determined. i The local pose difference is greater than the preset global pose difference threshold δ and the local pose difference ε i Two target historical poses that are greater than a preset local pose difference threshold ε. For example, the computer device iterates through historical times t=4, t=3, t=2, and t=1 to determine the global pose difference δ1~δ4 and the local pose difference ε1~ε4. If δ1, δ2, and δ4 among δ1~δ4 are greater than the preset global pose difference threshold δ, and ε1 and ε4 among ε1~ε4 are greater than the preset local pose difference threshold ε, then the historical global pose and historical local pose at t=4 and t=1 are taken as the target historical poses.
[0075] It is understandable that if the global pose difference δ i The local pose difference is greater than the preset global pose difference threshold δ and the local pose difference ε i If the difference in local pose is greater than a preset threshold ε, then the two time points are considered to be separated by a certain distance. In this way, the most recent N target historical poses that have a certain displacement difference from the current pose can be selected.
[0076] S402, determine the set of historical global poses based on the historical global poses in the target historical poses.
[0077] In this embodiment, the computer device determines the historical global pose set based on the historical global pose in the target historical pose. As shown in equation (6) below.
[0078]
[0079] Among them, the historical global pose set There are N elements, where n is an integer greater than or equal to 0 and less than or equal to N. This represents the nth element in the historical global pose set.
[0080] Referring to the example in S401 above, if the historical global pose and historical local pose at t=4 and t=1 are taken as the target historical pose, then... In reality, it is the historical global pose at t=4. In reality, it is the historical global pose at t=1.
[0081] S403, determine the set of historical local poses based on the historical local poses in the target historical pose.
[0082] In this embodiment, the computer device determines the set of historical local poses based on the historical local poses in the target historical poses. As shown in equation (7) below.
[0083]
[0084] Among them, the historical local pose set There are N elements, where n is an integer greater than or equal to 0 and less than or equal to N. This represents the nth element in the set of historical local poses. With historical global pose set The same applies, so I won't repeat it here.
[0085] S404. Determine the relative pose set based on the historical local pose set and the historical global pose set.
[0086] In this embodiment, the computer device uses equation (2) to determine the relative pose set based on the historical local pose set and the historical global pose set. Specifically, relative pose set As shown in equation (8) below.
[0087]
[0088] in, Including rotation matrix Translation vector
[0089] In this embodiment, the pose set includes a historical local pose set, a historical global pose set, and a relative pose set. First, from each historical pose, a target historical pose is determined where the global pose difference is greater than a preset global pose difference threshold, and the local pose difference is greater than a preset local pose difference threshold. Then, based on the historical local poses in the target historical pose, a historical local pose set is determined. Based on the historical global poses in the target historical pose, a historical global pose set is determined. Finally, based on the historical local pose set and the historical global pose set, a relative pose set is determined. Since the determined target historical pose has a global pose difference greater than a preset global pose difference threshold, and a local pose difference greater than a preset local pose difference threshold, a target historical pose with a certain displacement difference from the current pose is determined. This allows for the determination of the pose set, and based on the pose set, the target parameters of the current local pose relative to the current global pose are determined to improve positioning accuracy.
[0090] Figure 5 This is a schematic diagram of a process for determining the first rotation matrix in an embodiment of this application. (Refer to...) Figure 5 This embodiment relates to an optional implementation of how to determine the first rotation matrix. Based on the above embodiment, S203 includes the following steps:
[0091] S501, for each rotation vector in the relative pose set, determine the difference between the rotation vector and other rotation vectors.
[0092] In this embodiment, the computer device uses a set of relative poses. Determine the rotation matrix corresponding to each element in the pose set. For example Including rotation matrix
[0093] Furthermore, the computer device, according to Rodriguez's formula, will rotate the matrix... Represented as a rotation vector The following equation (9) is obtained.
[0094]
[0095] Furthermore, the computer device determines the differences between each rotation vector in the set of relative poses and other rotation vectors. For example, for each rotation vector... Computer equipment is determined separately and and and The differences between the two rotation vectors are determined N-1 times. This determination can be achieved by calculating the magnitude of the difference between the two rotation vectors or by calculating their quotient; this embodiment does not impose any limitations.
[0096] S502, the rotation vector with the smallest difference from the other rotation vectors is selected as the target rotation vector. In this embodiment, the computer device selects the rotation vector with the smallest difference from the other rotation vectors as the target rotation vector. One possible implementation is that the computer device determines the sum of the magnitudes of the differences between each rotation vector and the other rotation vectors, and selects the rotation vector with the smallest sum of the magnitudes of the differences from the other rotation vectors as the target rotation vector.
[0097] S503, obtain the first rotation matrix based on the target rotation vector.
[0098] In this embodiment, the computer device determines the rotation vector based on the target rotation vector. Obtain the first rotation matrix Specifically, the computer device can rotate the target rotation vector After being converted into a matrix, it is directly used as the first rotation matrix. Computer equipment can also rotate the target vector After iterative correction, it is then transformed into a matrix as the first rotation matrix.
[0099] Specifically, in this embodiment, the computer device... Perform m iterations of correction, then transform the result into a matrix to obtain the first rotation matrix. Where m is the preset number of iterations for correction, and its value is an integer greater than 0. The iterative process of the target rotation vector satisfies the following equation (10).
[0100]
[0101] Where m>0, for The corresponding rotation matrix, for The corresponding rotation matrix. The target rotation vector after the m-th correction is: The target rotation vector after the (m-1)th correction is: ω p ω represents the weight. p It satisfies the following equation (11).
[0102]
[0103] Where p takes values that are integers greater than 0 and less than N, and the noise figure σ can be set to 1 radian. When m = 1, That is, the target rotation vector
[0104] The computer device determines the result after the m-th iteration based on formulas (10) and (11). Afterwards, Perform singular value decomposition and normalization, and then transform the values after singular value decomposition and normalization into rotation vectors. Rotation vector As input for the next iteration.
[0105] After a certain number of iterations, the target rotation vector was successfully rotated. The correction will be made m times. Converting it to a rotation matrix yields the rotation matrix of the local coordinate system relative to the global coordinate system.
[0106] In this embodiment, the computer device determines the difference between each rotation vector in the relative pose set and other rotation vectors, and then selects the rotation vector with the smallest difference from the other rotation vectors as the target rotation vector, thereby obtaining the first rotation matrix based on the target rotation vector. Since the relative pose set is determined based on the historical global pose set and the historical local pose set, the first rotation matrix obtained from the relative pose set combines the global pose and the local pose, resulting in higher accuracy.
[0107] Figure 6 This is a schematic diagram illustrating a process for determining the difference between a rotation vector and other rotation vectors in an embodiment of this application. (Refer to...) Figure 6 This embodiment relates to an optional implementation of how to determine the difference between a rotation vector and other rotation vectors. Based on the above embodiment, S501 includes the following steps:
[0108] S601, for each rotation vector in the relative pose set, determine the difference between the rotation vector and other rotation vectors.
[0109] In this embodiment, the computer device targets a set of relative poses. For each rotation vector in the equation, determine the difference between the rotation vector and other rotation vectors. Specifically, according to equation (8), let 1≤j,k≤n and j≠k, based on the idea of Random Sample Consensus (RANSAC), traverse... For each rotation vector calculate Compared with other rotation vectors The difference between
[0110] S602, determine the quantization value of each rotation vector based on the difference between each rotation vector and other rotation vectors.
[0111] In this embodiment, the computer device determines the quantization value of each rotation vector based on the difference between each rotation vector and other rotation vectors. Specifically, if the difference between a rotation vector and other rotation vectors is less than a preset threshold th... R If the quantization value of the rotation vector is incremented by one, then the quantization value of the rotation vector is incremented by one.
[0112] For example, N=3, for like and All are less than the preset threshold th R ,but The quantization value is 2. For If only Less than the preset threshold th R ,but The quantization value is 1. And so on, without further explanation. Wherein, th R It can be set to 2 radians.
[0113] S603, based on the quantization value of each rotation vector, determine the difference between the rotation vector and other rotation vectors.
[0114] In this embodiment, the computer device determines the difference between a rotation vector and other rotation vectors based on the quantization values of each rotation vector. The computer device will... The rotation vector with the highest quantization value is taken as the difference between the rotation vector and the other rotation vectors. In other words, the rotation vector with the smallest difference from the other rotation vectors is taken as the target rotation vector. The rotation vector with the highest quantization value is used as the target rotation vector. Continuing with the example of S602 above, if exist If the quantization value is the highest, then... As the target rotation vector.
[0115] In this embodiment, the computer device determines the difference between each rotation vector and other rotation vectors in the relative pose set, and determines the quantization value of each rotation vector based on the difference between each rotation vector and other rotation vectors. Furthermore, based on the quantization value of each rotation vector, the difference between the rotation vector and other rotation vectors is determined. Since the difference between the rotation vector and other rotation vectors is determined based on the quantization value, the computer device can quickly find the rotation vector with the smallest difference from other rotation vectors as the target rotation vector, thereby improving the positioning accuracy.
[0116] Figure 7 This is a schematic diagram of a process for determining a first scale in an embodiment of this application, referred to... Figure 7 This embodiment relates to an optional implementation of how to determine the first scale. Based on the above embodiment, S203 further includes the following steps:
[0117] S701, determine the first translation difference set between each translation vector in the historical local pose set and other translation vectors.
[0118] In this embodiment, the computer device determines the historical local pose set according to equation (7). The first translation difference set L1 between each translation vector and other translation vectors is shown in equation (12).
[0119]
[0120] The first translation difference set L1 has m elements, L1 m This represents the m-th element in the first translation difference set L1. For example, As L1 1 ,Will
[0121] S702, determine the second translation difference set between each translation vector in the historical global pose set and other translation vectors.
[0122] In this embodiment, the computer device determines the historical global pose set according to equation (6). The second translation difference set L2 between each translation vector and other translation vectors is shown in equation (13). The principle of the second translation difference set L2 is the same as that of the first translation difference set L1, and will not be repeated here. It should be noted that the elements in the second translation difference set L2 and the first translation difference set L1 need to correspond one-to-one. For example, L1 1 yes Then L2 1 for
[0123]
[0124] S703, determine the first scale based on the first translation difference set and the second translation difference set.
[0125] In this embodiment, the computer device determines the first scale based on the first translation difference set and the second translation difference set. For example, the computer device directly uses the ratio of the first translation difference set and the second translation difference set as the first scale.
[0126] In this embodiment, a first translation difference set is determined between each translation vector in the historical local pose set and other translation vectors, and a second translation difference set is determined between each translation vector in the historical global pose set and other translation vectors. Based on the first and second translation difference sets, a first scale is determined. Since the first and second translation difference sets are determined based on the historical local pose set and the historical global pose set, respectively, the first scale combines global and local poses, resulting in higher accuracy.
[0127] Figure 8 This is a schematic diagram of another process for determining the first scale in an embodiment of this application, referred to... Figure 8 This embodiment relates to an optional implementation of how to determine the first scale. Based on the above embodiment, S703 includes the following steps:
[0128] S801, determine an initial scale set based on the first translation difference set and the second translation difference set, wherein the initial scale in the initial scale set is determined based on the ratio between the first translation difference and the corresponding second translation difference, the first translation difference set includes the first translation difference, and the second translation difference set includes the second translation difference.
[0129] In this embodiment, the computer device determines the initial scale set φ(S) based on the first translation difference set L1 and the second translation difference set L2. Specifically, the computer device determines the initial scale set φ(S) according to the following equation (14). Wherein, φ(S)={S1,S2,S3,…,S… m}. φ(S) also has m elements. That is, the initial scale S of φ(S) in the initial scale set. m According to the first translation difference L1 m With the corresponding second translation difference L2 m The ratio between them is determined.
[0130]
[0131] S802, the initial scale set is corrected to obtain the intermediate scale set.
[0132] In this embodiment, the computer device modifies the initial scale set φ(S) to obtain an intermediate scale set. One possible approach is for the computer device to calculate the average value of each element in the initial scale set φ(S), and then remove elements that deviate significantly from the average value to obtain the intermediate scale set φ(S). * (S).
[0133] S803, determine the first scale based on the intermediate scale set and the first translation difference set corresponding to the intermediate scale set.
[0134] In this embodiment, the computer device uses the intermediate scale set φ * (S) and intermediate scale set φ * (S) corresponds to the first translation difference set L1 * Determine the first scale S g .
[0135] It is understandable that the process by which the computer corrects the initial scale set φ(S) is actually a process of eliminating elements with excessively large errors, thus obtaining the intermediate scale set φ. * When (S), the intermediate scale set φ will also be obtained accordingly. * (S) corresponds to the first translation difference set L1 * As shown in equations (15) to (16) below. For example, φ(S) has 10 elements, and the computer device extracts the 5th element of φ(S) to obtain φ. * (S), then correspondingly, the 5th element will be removed from the first translation difference set L1 to obtain L1. * .
[0136] φ * (S) = {S1,S2,S3,…,S} q} (15)
[0137] L1 * ={L11,L12,L13,…,L1 q} (16)
[0138] Where q≤m.
[0139] Furthermore, the computer device is based on the intermediate scale set φ * (S) and intermediate scale set φ * (S) corresponds to the first translation difference set L1 * Determine the first scale S g As shown in equation (17).
[0140]
[0141] In this embodiment, an initial scale set is determined based on a first translation difference set and a second translation difference set. This initial scale set is then corrected to obtain an intermediate scale set. Finally, the first scale is determined based on the intermediate scale set and the corresponding first translation difference set. Since the initial scale set is determined based on the first and second translation differences, it combines local and global poses. Furthermore, the initial scale set needs to be corrected before the first scale can be finally determined, thus improving the accuracy of the first scale.
[0142] Figure 9 This is a schematic diagram of a process for determining an intermediate scale set in an embodiment of this application, referring to... Figure 9 This embodiment relates to an optional implementation of how to determine the intermediate scale set. Based on the above embodiment, S802 includes the following steps:
[0143] S901, determine the median of the initial scale set.
[0144] In this embodiment, the computer device sorts the elements in the initial scale set φ(S) according to size pairs to determine the median of the initial scale set.
[0145] S902, remove the initial scales in the initial scale set that meet the preset conditions to obtain the intermediate scale set; wherein, the preset conditions are that the median of the initial scales in the initial scale set is greater than the median of the first preset multiple or less than the median of the second preset multiple, and the first preset multiple is greater than the second preset multiple.
[0146] In this embodiment, the computer device traverses each element in the set φ(S), when or When (1≤p≤m), the computer device considers S p The error is relatively large, and S p It is removed from φ(S) to obtain the intermediate scale set φ * (S). That is, the preset condition is the initial scale S in the initial scale set φ(S). p The median that is greater than the first preset multiple 1 / 0.9 or less than the second preset multiple 0.9.
[0147] In this embodiment, the median of the initial scale set is determined, and the initial scales that meet the preset conditions in the initial scale set are divided to obtain the intermediate scale set, which further improves the accuracy of the intermediate scale set, thereby improving the accuracy of the first scale.
[0148] Figure 10 This is a schematic diagram of a process for determining the target translation vector in an embodiment of this application. (Refer to...) Figure 10 This embodiment relates to an optional implementation of how to determine the target translation vector. Based on the above embodiment, S203 further includes the following steps:
[0149] S1001, determine the initial translation vector set based on the historical local pose set, the first scale, and the first rotation matrix.
[0150] In this embodiment, when the computer device determines the first rotation matrix and the first scale S g Then, based on the historical local pose set First Scale S g and the first rotation matrix Determine the initial translation vectors at N time points, thereby determining the set of initial translation vectors. As shown in equations (18) to (19) below.
[0151]
[0152]
[0153] Among them, the historical local pose set There are N elements. Including rotation matrix Translation vector n is an integer with a value greater than or equal to 0 and less than or equal to N.
[0154] S1002, the first translation vector is obtained based on the initial set of translation vectors.
[0155] In this embodiment, the computer device uses an initial set of translation vectors. Obtain the first translation vector
[0156] Specifically, the computer equipment determines the initial set of translation vectors. The mean of N elements As shown in equation (20) below.
[0157]
[0158] With the first rotation matrix Similarly, computer equipment will also... Perform w iterations for correction, where w is the preset number of iterations for correction, and its value is an integer greater than 0.
[0159] The iterative process satisfies the following equation (21).
[0160]
[0161] Where, α d The weights are represented as shown in equation (22). The weights after the w-th correction are... for After the (w-1)th correction for
[0162]
[0163]
[0164] After a certain number of iterations, the following was achieved: The corrections yielded the rotation matrix of the local coordinate system relative to the global coordinate system.
[0165] In this embodiment, an initial translation vector set is determined based on the historical local pose set, the first scale, and the first rotation matrix. Then, a first translation vector is obtained based on the initial translation vector set. Since both the first scale and the first rotation matrix combine local and global poses, the first translation vector determined based on the historical local pose set, the first scale, and the first rotation matrix also has high accuracy.
[0166] Figure 11 This is a flowchart illustrating a process for determining the global pose of a target in an embodiment of this application. (Refer to...) Figure 11 This embodiment relates to an optional implementation of how to determine the global pose of a target. Based on the above embodiment, S204 further includes the following steps:
[0167] S1101, perform linear filtering on the first rotation matrix, the first scale, and the first translation vector to obtain the second rotation matrix, the second scale, and the second translation vector.
[0168] In this embodiment, the computer device operates on the first rotation matrix. First Scale S g and the first translation vector Perform linear filtering on each side to obtain the second rotation matrix. Second Scale Second translation vector
[0169] Specifically, the computer device uses the following equation (23) to rotate the first rotation matrix. First Scale S g and the first translation vector Perform linear filtering on each.
[0170]
[0171] Where 0 < λ < 1, and S last These are the first rotation matrix, the first translation vector, and the first scale, which were finally determined in the previous time step.
[0172] S1102, determine the target's global pose based on the current local pose, the second rotation matrix, the second scale, and the second translation vector.
[0173] In this embodiment, the computer device determines the location based on the current local pose. Second rotation matrix Second Scale Second translation vector Determine the global pose T of the target g Specifically, the computer device determines the target's global pose T using the following equation (24). g .
[0174]
[0175] Among them, the current local pose Including rotation matrix Translation vector The target global pose T at the current moment g Including rotation matrix R g Translation vector T g .
[0176] In this embodiment, the first rotation matrix, first scale, and first translation vector are linearly filtered to obtain the second rotation matrix, second scale, and second translation vector. Then, based on the current local pose, the second rotation matrix, second scale, and second translation vector, the target's global pose is determined. Since the target's global pose is determined using the second rotation matrix, second scale, and second translation vector obtained through linear filtering, along with the current local pose, the target's global pose at the current moment, obtained by transforming the current local pose to the global coordinate system, has higher accuracy.
[0177] To more clearly illustrate the pose localization method in this application, this paper combines... Figure 12 To explain. Figure 12 This is a schematic diagram of the pose positioning method in the embodiments of this application.
[0178] like Figure 12 As shown, the computer device obtains the current global pose at the current moment. and current local pose Then based on the current global pose Current local pose In addition to the historical poses of previous moments, the set of poses is determined, i.e., the historical global pose set. Historical Local Pose Set and relative pose set Furthermore, the computer device determines the first rotation matrix of the local coordinate system relative to the global coordinate system based on the pose set. First Scale S g and the first translation vector Then the computer equipment operates on the first rotation matrix. First Scale S g and the first translation vector Perform linear filtering on each side to obtain the second rotation matrix. Second Scale Second translation vector Ultimately, the computer device determines the local pose based on the current position. Second rotation matrix Second Scale Second translation vector Determine the global pose T of the target g , where the target global pose T g Including rotation matrix R g Translation vector t g .
[0179] Figure 13 This is a magnified view of the output trajectory. Figure 13 The pose localization results of the mobile vehicle in a real outdoor scene are shown when the pose localization method of this application and the traditional localization method are used respectively. Figure 13 The black dots in the transition are the global pose output in traditional localization methods, while Figure 13 The portion resembling a black straight line represents the global pose output using the pose localization method described in this application. Combined with... Figure 13 It is evident that the global pose localization obtained by traditional methods exhibits noticeable "small jumps" and the localization trajectory is not smooth enough; however, after using the pose localization method of this application, the output global pose of the target does not exhibit any "jumps," and the connected trajectory lines are very smooth, with significantly improved accuracy and better robustness.
[0180] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0181] Based on the same inventive concept, this application also provides a pose positioning device for implementing the pose positioning method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more pose positioning device embodiments provided below can be found in the limitations of the pose positioning method described above, and will not be repeated here.
[0182] Figure 14 This is a structural block diagram of the pose positioning device in an embodiment of this application. In this embodiment, as... Figure 14 As shown, a pose positioning device 1400 is provided, including: an acquisition module 1401, a first determination module 1402, a second determination module 1403, and a third determination module 1404, wherein:
[0183] The acquisition module 1401 is used to acquire the current pose at the current moment, wherein the current pose includes the current global pose and the current local pose.
[0184] The first determining module 1402 is used to determine a set of poses with displacement differences based on the current pose and the historical poses of historical moments before the current moment.
[0185] The second determining module 1403 is used to determine the target parameters of the current local pose relative to the current global pose based on the pose set, wherein the target parameters include a first rotation matrix, a first scale, and a first translation vector.
[0186] The third determining module 1404 is used to determine the target global pose at the current moment based on the current local pose, the first rotation matrix, the first translation vector, and the first scale.
[0187] The pose localization device provided in this application acquires the current pose at the current moment, which includes the current global pose and the current local pose. Based on the current pose and historical poses from previous moments, it determines a set of poses with displacement differences. Then, based on this set of poses, it determines a first rotation matrix, a first scale, and a first translation vector of the current local pose relative to the current global pose. Finally, based on the current local pose, the first rotation matrix, the first translation vector, and the first scale, it determines the target global pose at the current moment. In other words, the pose localization device provided in this application combines the global and local poses at the current and historical moments, determines the first rotation matrix, the first scale, and the first translation vector of the local pose relative to the global pose, and uses these determined first rotation matrix, first scale, and first translation vector to transform the current local pose to the global coordinate system, thereby obtaining the target global pose at the current moment. By fusing global and local poses, the fused global pose is achieved while also incorporating the advantages of high accuracy and smooth trajectory of local poses in a short time. Therefore, the fused global pose obtained by transforming the current local pose to the global coordinate system has higher accuracy. Thus, this application solves the problem of low accuracy inherent in traditional techniques that directly use global poses.
[0188] Optionally, the first determining module 1402 includes:
[0189] The first determining unit is used to determine the global pose difference between the current global pose and the historical global poses in each historical pose.
[0190] The second determining unit is used to determine the local pose difference between the current local pose and the historical local poses in each historical pose.
[0191] The third determining unit is used to determine the pose set based on the global pose difference and local pose difference corresponding to each historical pose.
[0192] Optionally, the third determining unit includes:
[0193] The first determining subunit is used to determine, from each historical pose, the target historical pose where the global pose difference is greater than a preset global pose difference threshold and the local pose difference is greater than a preset local pose difference threshold.
[0194] The second determining subunit is used to determine the set of historical global poses based on the historical global poses in the target's historical poses.
[0195] The third determining sub-unit is used to determine the set of historical local poses based on the historical local poses in the target's historical poses.
[0196] The fourth determining sub-unit is used to determine the relative pose set based on the historical local pose set and the historical global pose set; wherein, the pose set includes the historical global pose set, the historical local pose set, and the relative pose set.
[0197] Optionally, the target parameters include a first rotation matrix, and the second determining module 1403 includes:
[0198] The fourth determining unit is used to determine the difference between each rotation vector and other rotation vectors in the relative pose set.
[0199] The fifth determining unit is used to select the rotation vector that has the smallest difference from other rotation vectors as the target rotation vector.
[0200] The sixth determining unit is used to obtain the first rotation matrix based on the target rotation vector.
[0201] Optionally, the fourth determining unit includes:
[0202] The fifth determining sub-unit is used to determine the difference between each rotation vector and other rotation vectors in the relative pose set.
[0203] The sixth determining sub-unit is used to determine the quantization value of each rotation vector based on the difference between each rotation vector and other rotation vectors.
[0204] The seventh determining sub-unit is used to determine the difference between rotation vectors and other rotation vectors based on the quantization value of each rotation vector.
[0205] Optionally, the target parameters include a first scale, and the second determining module 1403 further includes:
[0206] The seventh determining unit is used to determine the first translation difference set between each translation vector in the historical local pose set and other translation vectors.
[0207] The eighth determining unit is used to determine the second translation difference set between each translation vector in the historical global pose set and other translation vectors.
[0208] The ninth determining unit is used to determine the first scale based on the first translation difference set and the second translation difference set.
[0209] Optionally, the ninth determining unit includes:
[0210] The eighth determining subunit is used to determine an initial scale set based on a first translation difference set and a second translation difference set, wherein the initial scale in the initial scale set is determined based on the ratio between the first translation difference and the corresponding second translation difference, the first translation difference set includes the first translation difference, and the second translation difference set includes the second translation difference.
[0211] The correction sub-unit is used to correct the initial scale set to obtain the intermediate scale set.
[0212] The ninth determining sub-unit is used to determine the first scale based on the intermediate scale set and the first translation difference set corresponding to the intermediate scale set.
[0213] Optionally, a correction sub-unit is used to determine the median of the initial scale set; and to remove the initial scales in the initial scale set that meet preset conditions to obtain an intermediate scale set; wherein, the preset conditions are that the median of the initial scales in the initial scale set is greater than a first preset multiple or less than a second preset multiple, and the first preset multiple is greater than the second preset multiple.
[0214] Optionally, the target parameters include a first translation vector, and the second determining module 1403 further includes:
[0215] The tenth determining unit is used to determine the initial translation vector set based on the historical local pose set, the first scale, and the first rotation matrix.
[0216] The eleventh determining unit is used to obtain the first translation vector based on the initial set of translation vectors.
[0217] Optionally, the third determining module 1404 includes:
[0218] The filtering unit is used to perform linear filtering on the first rotation matrix, the first scale, and the first translation vector to obtain the second rotation matrix, the second scale, and the second translation vector.
[0219] The twelfth determining unit determines the target's global pose based on the current local pose, the second rotation matrix, the second scale, and the second translation vector.
[0220] Each module in the aforementioned pose positioning device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0221] Figure 15 This is an internal structural diagram of a computer device in an embodiment of this application. In this embodiment, a computer device is provided, which may be a server, and its internal structural diagram may be as shown below. Figure 15As shown. The computer device includes a processor, memory, and network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores relevant data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a pose localization method. Those skilled in the art will understand that... Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0222] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0223] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0224] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0225] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0226] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0227] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0228] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A pose localization method, characterized in that, The method includes: Obtain the current pose at the current moment, wherein the current pose includes the current global pose and the current local pose; Based on the current pose and the historical poses of historical moments before the current moment, a pose set with displacement difference is determined; the pose set includes a historical global pose set, a historical local pose set, and a relative pose set; the relative pose set is determined based on the historical local pose set and the historical global pose set. Based on the pose set, target parameters of the current local pose relative to the current global pose are determined, wherein the target parameters include a first rotation matrix, a first scale, and a first translation vector; The target global pose at the current moment is determined based on the current local pose, the first rotation matrix, the first translation vector, and the first scale. Determining the target parameters of the current local pose relative to the current global pose based on the pose set includes: For each rotation vector in the relative pose set, determine the difference between the rotation vector and other rotation vectors; The rotation vector that differs least from the other rotation vectors is taken as the target rotation vector; The first rotation matrix is obtained based on the target rotation vector.
2. The method according to claim 1, characterized in that, The number of historical poses is multiple; the step of determining a set of poses with displacement differences based on the current pose and the historical poses from previous times includes: Determine the global pose difference between the current global pose and each of the historical global poses; Determine the local pose difference between the current local pose and each of the historical local poses; The pose set is determined based on the global pose difference and local pose difference corresponding to each of the historical poses.
3. The method according to claim 2, characterized in that, The step of determining the pose set based on the global pose difference and local pose difference corresponding to each of the historical poses includes: From each of the historical poses, a target historical pose is determined where the global pose difference is greater than a preset global pose difference threshold and the local pose difference is greater than a preset local pose difference threshold. The set of historical global poses is determined based on the historical global poses in the target historical poses; The set of historical local poses is determined based on the historical local poses in the target historical pose. The relative pose set is determined based on the historical local pose set and the historical global pose set.
4. The method according to claim 1, characterized in that, Determining the difference between each rotation vector and other rotation vectors in the relative pose set includes: For each rotation vector in the relative pose set, determine the difference between the rotation vector and other rotation vectors; The quantization value of each rotation vector is determined based on the difference between each rotation vector and the other rotation vectors; The difference between the rotation vector and other rotation vectors is determined based on the quantization value of each rotation vector.
5. The method according to claim 1, characterized in that, The target parameters include the first scale; determining the target parameters of the current local pose relative to the current global pose based on the pose set includes: Determine the first translation difference set between each translation vector in the historical local pose set and other translation vectors; Determine the second translation difference set between each translation vector in the historical global pose set and other translation vectors; The first scale is determined based on the first translation difference set and the second translation difference set.
6. The method according to claim 5, characterized in that, Determining the first scale based on the first translation difference set and the second translation difference set includes: An initial scale set is determined based on the first translation difference set and the second translation difference set, wherein the initial scale in the initial scale set is determined according to the ratio between the first translation difference and the corresponding second translation difference, the first translation difference set includes the first translation difference, and the second translation difference set includes the second translation difference; The initial scale set is modified to obtain the intermediate scale set; The first scale is determined based on the intermediate scale set and the first translation difference set corresponding to the intermediate scale set.
7. The method according to claim 6, characterized in that, The step of correcting the initial scale set to obtain an intermediate scale set includes: Determine the median of the initial scale set; The initial scales that meet the preset conditions in the initial scale set are removed to obtain the intermediate scale set; The preset condition is that the median of the initial scales in the initial scale set is greater than a first preset multiple or less than a second preset multiple, wherein the first preset multiple is greater than the second preset multiple.
8. The method according to claim 1, characterized in that, The target parameters include the first translation vector; determining the target parameters of the current local pose relative to the current global pose based on the pose set includes: Based on the historical local pose set, the first scale, and the first rotation matrix, determine the initial translation vector set; The first translation vector is obtained based on the initial set of translation vectors.
9. The method according to any one of claims 1-8, characterized in that, Determining the target global pose at the current moment based on the current local pose, the first rotation matrix, the first translation vector, and the first scale includes: Linear filtering is performed on the first rotation matrix, the first scale, and the first translation vector to obtain the second rotation matrix, the second scale, and the second translation vector. The target global pose is determined based on the current local pose, the second rotation matrix, the second scale, and the second translation vector.
10. A pose positioning device, characterized in that, The device includes: The acquisition module is used to acquire the current pose at the current moment, wherein the current pose includes the current global pose and the current local pose; The first determining module is used to determine a pose set with displacement difference based on the current pose and the historical poses of historical moments before the current moment; the pose set includes a historical global pose set, a historical local pose set, and a relative pose set; the relative pose set is determined based on the historical local pose set and the historical global pose set. The second determining module is used to determine the target parameters of the current local pose relative to the current global pose based on the pose set, wherein the target parameters include a first rotation matrix, a first scale, and a first translation vector; The third determining module is used to determine the target global pose at the current moment based on the current local pose, the first rotation matrix, the first translation vector, and the first scale. The second determining module is further configured to determine the difference between each rotation vector in the relative pose set and other rotation vectors; take the rotation vector with the smallest difference from other rotation vectors as the target rotation vector; and obtain the first rotation matrix based on the target rotation vector.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for processing repositioning of sweeping robot and electronic equipment
CN111568305A