External parameter updating method and device of inertial measurement unit, robot and storage medium
By acquiring and filtering the rotation axis data of the inertial measurement unit during robot motion and updating the IMU extrinsic parameters, the problem of inaccurate IMU extrinsic parameter estimation is solved, and the accuracy and stability of the robot's navigation and positioning are improved.
Patent Information
- Application Number
- CN202410464064.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-10-24
Smart Images

Figure CN120831129A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robots, and more particularly, to a method and device for updating an external parameter of an inertial measurement unit, a robot, and a computer readable storage medium. BACKGROUND
[0002] In robot navigation and positioning, the accuracy of the external parameter of an inertial measurement unit (IMU) is crucial to ensuring the accuracy and stability of robot positioning. However, due to the interference of external environment and sensor noise and other factors, the measurement value of the IMU in actual application may have abnormal values, resulting in inaccurate estimation of the external parameter of the IMU, and thus reducing the performance of robot navigation and positioning. SUMMARY
[0003] The present application provides a method and device for updating an external parameter of an inertial measurement unit, a robot, and a computer readable storage medium, which can realize online updating of the external parameter of the inertial measurement unit, reduce abnormal robot pose estimation caused by changes in the external parameter of the inertial measurement unit, and improve the accuracy and stability of robot navigation and positioning.
[0004] In a first aspect, a method for updating an external parameter of an inertial measurement unit is provided, applied to a robot, the robot comprising an inertial measurement unit; the method comprising: obtaining rotation axis data of the inertial measurement unit during planar rotation motion of the robot, to obtain first rotation axis data; filtering the first rotation axis data to obtain second rotation axis data at different positions during planar rotation motion of the robot; determining third rotation axis data during planar rotation motion of the robot on the ground according to the second rotation axis data; and updating the external parameter of the inertial measurement unit according to the third rotation axis data and current external parameter data of the inertial measurement unit.
[0005] In the technical solution, the rotation axis data of the inertial measurement unit during the planar rotation motion of the robot is obtained to obtain first rotation axis data, the first rotation axis data is filtered to obtain second rotation axis data of the robot at different positions during the planar rotation motion, the third rotation axis data of the robot during the planar rotation motion on the ground is determined according to the second rotation axis data, and the inertial measurement unit is updated according to the third rotation axis data and the current external parameter data of the inertial measurement unit. The technical solution realizes the correction of the original calibration external parameter of the inertial measurement unit according to the rotation axis data of the inertial measurement unit generated by the planar rotation motion of the robot at different positions on the ground, realizes the online update of the external parameter of the inertial measurement unit, can reduce the abnormal robot posture estimation caused by the change of the external parameter of the inertial measurement unit, and can improve the accuracy and stability of the robot navigation and positioning.
[0006] In combination with the first aspect, in some possible implementation manners, the rotation axis data of the inertial measurement unit during the planar rotation motion of the robot is obtained to obtain first rotation axis data, including: obtaining the rotation axis data from a pre-constructed ring buffer every interval of a preset time length to obtain fourth rotation axis data; wherein the ring buffer includes the rotation axis data of the inertial measurement unit at different times during the planar motion and the non-planar motion of the robot; the rotation axis data corresponding to the non-planar motion period in the fourth rotation axis data is determined; the rotation axis data corresponding to the non-planar motion period is filtered from the fourth rotation axis data to obtain the rotation axis data corresponding to the planar motion period; and the rotation axis data of the robot during the rotation motion is determined from the rotation axis data corresponding to the planar motion period to obtain the first rotation axis data.
[0007] With reference to the first aspect and the above implementation manners, in some possible implementation manners, the determining the rotation axis data corresponding to the non-planar motion from the fourth rotation axis data comprises: determining absolute values of each rotation axis data in the fourth rotation axis data to obtain a plurality of absolute values; determining, as target absolute values, the absolute values greater than or equal to an absolute value threshold from the plurality of absolute values; obtaining a first data quantity of the rotation axis data corresponding to the target absolute values in the fourth rotation axis data; if the first data quantity is greater than or equal to a first quantity threshold, randomly selecting two rotation axis data from the rotation axis data corresponding to the target absolute values; taking the two randomly selected rotation axis data as first target data, and taking the rotation axis data corresponding to the target absolute values and excluding the first target data as second target data; drawing a target straight line based on the first target data as two data points; determining a first distance between each rotation axis data in the second target data and the target straight line to obtain a plurality of first distances; determining, as a first target distance, the first distance greater than or equal to a first distance threshold from the plurality of first distances; and filtering the rotation axis data corresponding to the first target distance from the rotation axis data corresponding to the target absolute values to obtain the rotation axis data corresponding to the non-planar motion.
[0008] With reference to the first aspect and the above implementation manners, in some possible implementation manners, the determining the rotation axis data corresponding to the non-planar motion from the fourth rotation axis data comprises: determining absolute values of each rotation axis data in the fourth rotation axis data to obtain a plurality of absolute values; determining, as target absolute values, the absolute values greater than or equal to an absolute value threshold from the plurality of absolute values; obtaining a first data quantity of the rotation axis data corresponding to the target absolute values in the fourth rotation axis data; if the first data quantity is greater than or equal to a first quantity threshold, randomly selecting two rotation axis data from the rotation axis data corresponding to the target absolute values; taking the two randomly selected rotation axis data as first target data, and taking the rotation axis data corresponding to the target absolute values and excluding the first target data as second target data; drawing a target straight line based on the first target data as two data points; determining a first distance between each rotation axis data in the second target data and the target straight line to obtain a plurality of first distances; determining, as a first target distance, the first distance greater than or equal to a first distance threshold from the plurality of first distances; and filtering the rotation axis data corresponding to the first target distance from the rotation axis data corresponding to the target absolute values to obtain the rotation axis data corresponding to the non-planar motion.
[0009] With reference to the first aspect and the above implementation manners, in some possible implementation manners, the method further comprises: in the case that the robot moves according to the navigation path, obtaining rotation axis data of the inertial measurement unit at different time points to obtain rotation axis data corresponding to the navigation path; wherein the robot moving according to the navigation path comprises planar motion and non-planar motion; correcting the rotation axis data corresponding to the navigation path, and storing the corrected rotation axis data to the ring buffer in chronological order.
[0010] In some possible implementation manners, the filtering the first rotation axis data to obtain the second rotation axis data of the robot at different positions during the planar rotation motion of the robot includes: integrating each rotation axis data in the first rotation axis data to obtain a rotation amount corresponding to each rotation axis data; determining a rotation amount less than or equal to a rotation amount threshold value in the rotation amount corresponding to each rotation axis data as a target rotation amount; filtering the rotation axis data corresponding to the target rotation amount in the first rotation axis data to obtain fifth rotation axis data; obtaining a second robot position associated with each rotation axis data in the fifth rotation axis data to obtain a plurality of second robot positions; determining a second distance between each of the plurality of second robot positions and other second robot positions to obtain a plurality of second distances; and determining the fifth rotation axis data as the second rotation axis data if all the plurality of second distances are greater than a second distance threshold value.
[0011] In some possible implementation manners, the determining the third rotation axis data of the robot during the planar rotation motion of the robot on the ground according to the second rotation axis data includes: obtaining a second data quantity of the rotation axis data in the second rotation axis data; determining, as third target data, the rotation axis data obtained at the latest time in the second rotation axis data and determining, as fourth target data, the rotation axis data other than the third target data in the second rotation axis data if the second data quantity is greater than or equal to a second quantity threshold value; determining a rotation axis included angle between each rotation axis data in the third target data and the fourth target data to obtain a plurality of rotation axis included angles; and determining the second rotation axis data as the third rotation axis data if a first difference between a maximum rotation axis included angle and a minimum rotation axis included angle in the plurality of rotation axis included angles is less than or equal to a first preset difference value.
[0012] In some possible implementation manners, the current extrinsic parameter data includes preset rotation axis data; and the performing extrinsic parameter updating on the inertial measurement unit according to the third rotation axis data and the current extrinsic parameter data of the inertial measurement unit includes: determining a second difference between each rotation axis data in the third rotation axis data and the preset rotation axis data to obtain a plurality of second differences; determining, as target difference, a second difference greater than a second preset difference in the plurality of second differences; filtering the rotation axis data corresponding to the target difference in the third rotation axis data to obtain target rotation axis data; and performing extrinsic parameter updating on the inertial measurement unit according to the target rotation axis data and the current extrinsic parameter data.
[0013] In the technical solution, the rotation axis data corresponding to the target difference value in the third rotation axis data represents rotation axis data having a large difference from the preset rotation axis data, the rotation axis data corresponding to the target difference value in the third rotation axis data is filtered, that is, the rotation axis data having a large difference from the preset rotation axis data in the third rotation axis data is filtered, the target rotation axis data participating in the IMU external parameter updating does not include the rotation axis data having a large difference from the preset rotation axis data, and the accuracy of the IMU external parameter updating can be ensured.
[0014] With reference to the first aspect and the implementation manners above, in some possible implementation manners, the external parameter updating of the inertial measurement unit according to the target rotation axis data and the current external parameter data includes: determining a quaternion according to the target rotation axis data and the current external parameter data; filtering a product of the quaternion and the current external parameter to obtain target external parameter data of the inertial measurement unit; and replacing the current external parameter data with the external parameter data to update the external parameter of the inertial measurement unit.
[0015] The second aspect provides an external parameter updating device configured in a robot, the robot including an inertial measurement unit, and the external parameter updating device including:
[0016] a data acquisition module configured to acquire rotation axis data of the inertial measurement unit during planar rotation of the robot to obtain first rotation axis data when the robot is moving;
[0017] a data filtering module configured to filter the first rotation axis data to obtain second rotation axis data of the robot at different positions during planar rotation of the robot;
[0018] a data determination module configured to determine third rotation axis data of the robot during planar rotation on the ground according to the second rotation axis data;
[0019] a parameter updating module configured to update an external parameter of the inertial measurement unit according to the third rotation axis data and current external parameter data of the inertial measurement unit.
[0020] With reference to the second aspect, in some possible implementation manners, the data acquisition module includes:
[0021] a first acquisition unit configured to acquire rotation axis data from a pre-constructed ring buffer once every preset time length to obtain fourth rotation axis data, wherein the ring buffer includes rotation axis data of the inertial measurement unit acquired at different time points during planar rotation and non-planar rotation of the robot;
[0022] a first determination unit configured to determine rotation axis data corresponding to the non-planar rotation in the fourth rotation axis data;
[0023] The second acquisition unit is configured to filter the rotation axis data corresponding to the non-planar motion from the fourth rotation axis data to obtain rotation axis data corresponding to the planar motion.
[0024] The second determination unit is configured to determine the rotation axis data of the robot in the rotation motion from the rotation axis data corresponding to the planar motion to obtain the first rotation axis data.
[0025] With reference to the second aspect and the implementation manners of the second aspect, in some possible implementation manners, the first determination unit is specifically configured to: determine absolute values of the rotation axis data in the fourth rotation axis data to obtain a plurality of absolute values; determine an absolute value greater than or equal to an absolute value threshold as a target absolute value from the plurality of absolute values; obtain a first data quantity of the rotation axis data corresponding to the target absolute value in the fourth rotation axis data; if the first data quantity is greater than or equal to a first quantity threshold, randomly select two rotation axis data from the rotation axis data corresponding to the target absolute value; take the two randomly selected rotation axis data as first target data, and take the rotation axis data corresponding to the target absolute value and excluding the first target data as second target data; draw a target straight line based on the first target data as two data points; determine a first distance between each of the second target data and the target straight line to obtain a plurality of first distances; determine a first target distance from the plurality of first distances, the first target distance being greater than or equal to a first distance threshold; and filter the rotation axis data corresponding to the first target distance from the rotation axis data corresponding to the target absolute value to obtain the rotation axis data corresponding to the non-planar motion.
[0026] With reference to the second aspect and the implementation manners of the second aspect, in some possible implementation manners, the second determination unit is specifically configured to: obtain a plurality of first robot positions associated with the rotation axis data corresponding to the planar rotation motion; determine a second distance between two first robot positions at adjacent time points from the plurality of first robot positions to obtain a plurality of second distances; determine a second target distance from the plurality of second distances, the second target distance being less than a second distance threshold, and determine a target position corresponding to the second target distance as the first robot position; and determine the rotation axis data corresponding to the target position from the rotation axis data corresponding to the planar rotation motion as the rotation axis data of the robot in the rotation motion to obtain the first rotation axis data.
[0027] With reference to the second aspect and the implementation manners of the second aspect, in some possible implementation manners, the external parameter updating apparatus further includes:
[0028] The storage unit is configured to acquire rotation axis data of the inertial measurement unit at different time points when the robot moves according to the navigation path, to obtain rotation axis data corresponding to the navigation path; wherein the movement of the robot according to the navigation path includes planar movement and non-planar movement; the rotation axis data corresponding to the navigation path is corrected, and the corrected rotation axis data is stored in the ring buffer in chronological order.
[0029] With reference to the second aspect and the foregoing implementations, in some possible implementations, the data filtering module is specifically configured to: integrate each piece of rotation axis data in the first rotation axis data to obtain a rotation amount corresponding to each piece of rotation axis data; determine, as a target rotation amount, a rotation amount that is less than or equal to a rotation amount threshold in the rotation amount corresponding to each piece of rotation axis data; filter the rotation axis data corresponding to the target rotation amount in the first rotation axis data to obtain fifth rotation axis data; obtain a second robot position associated with each piece of rotation axis data in the fifth rotation axis data to obtain a plurality of second robot positions; determine a second distance between each of the plurality of second robot positions and the other second robot positions to obtain a plurality of second distances; and determine the fifth rotation axis data as the second rotation axis data if all the plurality of second distances are greater than a second distance threshold.
[0030] With reference to the second aspect and the foregoing implementations, in some possible implementations, the data determination module is specifically configured to: obtain a second data quantity of the rotation axis data in the second rotation axis data; determine, as third target data, the rotation axis data obtained at the latest time in the second rotation axis data and, as fourth target data, the rotation axis data other than the third target data in the second rotation axis data if the second data quantity is greater than or equal to a second quantity threshold; determine an angle between each piece of rotation axis data in the third target data and the fourth target data to obtain a plurality of rotation axis angles; and determine the second rotation axis data as the third rotation axis data if a first difference between a maximum rotation axis angle and a minimum rotation axis angle in the plurality of rotation axis angles is less than or equal to a first preset difference.
[0031] With reference to the second aspect and the foregoing implementations, in some possible implementations, the current extrinsic parameter data includes preset rotation axis data; and the parameter updating module includes:
[0032] The third determination unit is configured to determine a second difference between each piece of rotation axis data in the third rotation axis data and the preset rotation axis data to obtain a plurality of second differences;
[0033] The fourth determination unit is configured to determine, as a target difference, a second difference that is greater than a second preset difference in the plurality of second differences.
[0034] The third acquisition unit is configured to filter the rotation axis data corresponding to the target difference in the third rotation axis data to obtain target rotation axis data.
[0035] The parameter updating unit is configured to perform external parameter updating on the inertial measurement unit according to the target rotation axis data and the current external parameter data.
[0036] With reference to the second aspect and the implementation manners described above, in some possible implementation manners, the parameter updating unit is specifically configured to: determine a quaternion according to the target rotation axis data and the current external parameter data; filter a product of the quaternion and the current external parameter to obtain target external parameter data of the inertial measurement unit; and replace the current external parameter data with the target external parameter data to perform external parameter updating on the inertial measurement unit.
[0037] In a third aspect, a robot is provided, which includes a memory and a processor. The memory is configured to store executable program code, and the processor is configured to invoke and run the executable program code from the memory, so that the robot performs the external parameter updating method of the inertial measurement unit in the first aspect or any possible implementation manner of the first aspect.
[0038] In a fourth aspect, a computer program product is provided, which includes computer program code. When the computer program code is run on a computer, the computer is caused to perform the external parameter updating method of the inertial measurement unit in the first aspect or any possible implementation manner of the first aspect.
[0039] In a fifth aspect, a computer readable storage medium is provided, which stores computer program code. When the computer program code is run on a computer, the computer is caused to perform the external parameter updating method of the inertial measurement unit in the first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 A schematic flowchart of an external parameter updating method of an inertial measurement unit is shown;
[0041] Figure 2 A schematic diagram of a robot planar rotation motion is shown;
[0042] Figure 3 A top view schematic diagram of a robot changing the rotation direction continuously is shown;
[0043] Figure 4 A structural schematic diagram of an external parameter updating device is shown;
[0044] Figure 5 A structural schematic diagram of a robot is shown. DETAILED DESCRIPTION
[0045] The technical solutions in the present application will be clearly and completely described below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B: "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0046] Hereinafter, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more features.
[0047] In robot navigation and positioning, the accuracy of the external parameters of the IMU is crucial to ensure the accuracy and stability of the robot positioning. However, due to the interference of external environment and sensor noise and other factors, the measured values of the IMU in actual application may have abnormal values, resulting in inaccurate estimation of the external parameters of the IMU, thereby reducing the performance of robot navigation and positioning.
[0048] Based on the above problems, the present application provides an inertial measurement unit external parameter updating method, device, robot and computer readable storage medium, by acquiring the rotation axis data of the IMU during the motion of the robot, filtering the acquired rotation axis data of the IMU to obtain the rotation axis data of the IMU corresponding to the specific plane rotation motion of the robot, called first rotation axis data, and then filtering the first rotation axis data to obtain the rotation axis data of the IMU under different positions of the robot in plane rotation motion, called second rotation axis data, that is, the rotation axis data of the IMU in the second rotation axis data is generated when the robot rotates on the ground at different positions, and the third rotation axis data is determined from the second rotation axis data when the robot rotates on the ground at different positions, that is, the third rotation axis data is generated when the robot rotates on the ground at different positions, and after obtaining the third rotation axis data, the current external parameter data of the IMU is obtained according to the third rotation axis data and the current external parameter data of the IMU, thereby realizing online updating of the external parameters of the IMU. Not only can it reduce the abnormality of robot attitude estimation caused by changes in the external parameters of the inertial measurement unit, but also can improve the accuracy and stability of robot navigation and positioning.
[0049] The following is an embodiment of an inertial measurement unit external parameter updating method provided by the embodiments of the present application.
[0050] Figure 1 A schematic flowchart of the method for updating the extrinsic parameters of an inertial measurement unit is shown. As an example, as shown in Figure 1 The method for updating the extrinsic parameters of an inertial measurement unit provided by the embodiments of the present application is applied to a robot, and the robot includes an IMU, and the IMU includes an accelerometer and a gyroscope. The method for updating the extrinsic parameters of an inertial measurement unit includes the following scheme:
[0051] S110: In the case of robot motion, the rotation axis data of the inertial measurement unit during the planar rotation motion of the robot is obtained to obtain first rotation axis data.
[0052] In an exemplary embodiment, the planar motion refers to the motion of the robot, in which any point on the robot body always moves in a certain fixed spatial plane, and the planar rotation motion refers to the rotation of the robot during the planar motion. As shown in Figure 2 Figure 2 A schematic diagram of the planar rotation motion of the robot is shown, 100 represents the robot, 200 represents the spatial plane, and 300 represents a point on the robot body. When the robot 100 rotates clockwise, the point 300 always moves in the spatial plane 200.
[0053] The rotation axis data of the IMU includes the angular velocity of the gyroscope, also known as the rotation axis. In the case of robot motion, the rotation axis data of the IMU generated during the planar rotation motion of the robot is obtained, and the obtained rotation axis data of the IMU is referred to as the first rotation axis data. That is, the rotation axis data of the IMU in the first rotation axis data corresponds to the planar rotation motion of the robot.
[0054] S120: Filtering the first rotation axis data to obtain second rotation axis data of the robot at different positions during the planar rotation motion.
[0055] After obtaining the first rotation axis data, the first rotation axis data is filtered twice, which is first filtered for motion consistency, and then after the motion consistency filtering, spatial sparsity sampling is performed, so as to obtain the second rotation axis data of the robot at different positions during the planar rotation motion, that is, the rotation axis data in the second rotation axis data is generated by the planar rotation motion of the robot at different positions.
[0056] S130: Determining third rotation axis data of the robot during the planar rotation motion on the ground according to the second rotation axis data.
[0057] After obtaining the second rotation axis data, it is judged whether the rotation axis data of the IMU in the second rotation axis data is generated by the planar rotation motion on the ground at different positions, and if so, the second rotation axis data is determined as the third rotation axis data of the robot during the planar rotation motion on the ground, that is, the rotation axis data of the IMU in the third rotation axis data is generated by the planar rotation motion of the robot on the ground at different positions, and the direction of the rotation axis included in the third rotation axis data is perpendicular to the ground and upward.
[0058] S140: According to the third rotation axis data and the current extrinsic parameter data of the inertial measurement unit, the extrinsic parameter of the inertial measurement unit is updated.
[0059] Since the extrinsic parameter of the IMU is calibrated at the factory, after the robot works, the calibrated extrinsic parameter of the IMU changes slightly due to factors such as pressure and wear of the wheels of the robot. Therefore, the rotation axis of the gyroscope of the robot during rotation is perpendicular to the ground and upward. During the movement of the robot, the difference between the rotation axis collected by the IMU and the calibrated rotation axis is small. Therefore, the subtle difference can be used to update the extrinsic parameter data of the IMU, which includes the pitch angle (Pitch) and the roll angle (Roll) of the gyroscope.
[0060] After obtaining the third rotation axis data, the current extrinsic parameter data of the IMU is obtained, which is the previously calibrated extrinsic parameter data. According to the difference between the rotation axis in the third rotation axis data and the rotation axis in the current extrinsic parameter data, the current extrinsic parameter data of the IMU is corrected, thereby realizing online updating of the extrinsic parameter of the IMU.
[0061] The embodiment of the present application obtains the rotation axis data of the inertial measurement unit during the planar rotation motion of the robot, to obtain the first rotation axis data, filters the first rotation axis data, to obtain the second rotation axis data of the robot at different positions during the planar rotation motion, determines the third rotation axis data of the robot during the planar rotation motion on the ground according to the second rotation axis data, and updates the extrinsic parameter of the inertial measurement unit according to the third rotation axis data and the current extrinsic parameter data of the inertial measurement unit. The technical scheme realizes that the original calibrated extrinsic parameter of the IMU is corrected according to the rotation axis data of the IMU generated by the planar rotation motion of the robot on the ground at different positions, and the online updating of the extrinsic parameter of the IMU is realized. Not only can the abnormality of the robot pose estimation caused by the change of the extrinsic parameter of the IMU be reduced, but also the accuracy and stability of the robot navigation and positioning can be improved.
[0062] The following is Figure 1The specific implementation of each step in the illustrated embodiment is described:
[0063] In one possible implementation, the above-mentioned obtaining the rotation axis data of the inertial measurement unit during the planar rotation motion of the robot to obtain the first rotation axis data includes the following solutions:
[0064] The rotation axis data is obtained from the pre-constructed ring buffer every interval of a preset time length to obtain fourth rotation axis data; wherein the ring buffer includes the rotation axis data of the inertial measurement unit obtained at different time during the planar motion and the non-planar motion of the robot;
[0065] The rotation axis data corresponding to the non-planar motion is determined from the fourth rotation axis data;
[0066] The rotation axis data corresponding to the non-planar motion is filtered from the fourth rotation axis data to obtain the rotation axis data corresponding to the planar motion;
[0067] The rotation axis data of the robot during the rotation motion is determined from the rotation axis data corresponding to the planar motion to obtain the first rotation axis data.
[0068] A ring buffer for storing data is pre-constructed, and the ring buffer includes the rotation axis data of the inertial measurement unit obtained at different time during the planar motion and the non-planar motion of the robot, wherein the motion state of the robot is a state other than the planar motion, referred to as the non-planar motion, and the non-planar motion refers to that when the robot is in motion, any point on the robot body is not always moving in parallel to a certain fixed spatial plane, for example, it can cross multiple spatial planes.
[0069] During the continuous motion of the robot, the rotation axis data stored in the ring buffer is constantly updated, for example, when the ring buffer is full, the newly generated rotation axis data will cover the earliest stored rotation axis data, or the earliest stored rotation axis data will be deleted from the ring buffer.
[0070] The rotation axis data is obtained from the ring buffer every interval of a preset time length (for example, 2 seconds), and the rotation axis data obtained each time is all the data stored in the ring buffer, so that the rotation axis data obtained from the ring buffer each time is referred to as the fourth rotation axis data.
[0071] After the fourth rotation axis data is obtained, the rotation axis data of the IMU corresponding to the non-planar motion of the robot is determined from the fourth rotation axis data, denoted as Date-FP, and then Date-FP is filtered from the fourth rotation axis data, and the data remaining in the fourth rotation axis data is the rotation axis data of the IMU corresponding to the planar motion of the robot, denoted as Date-P, and then the rotation axis data of the robot during the rotation motion is determined from Date-P, denoted as Date-PX, that is, Date-PX is the first rotation axis data.
[0072] In a possible implementation, the above determining the rotation axis data corresponding to the non-planar motion in the fourth rotation axis data includes the following scheme.
[0073] The absolute values of each rotation axis data in the fourth rotation axis data are determined to obtain a plurality of absolute values.
[0074] The absolute values greater than or equal to an absolute value threshold in the plurality of absolute values are determined as target absolute values.
[0075] The first data quantity of the rotation axis data corresponding to the target absolute value in the fourth rotation axis data is obtained.
[0076] If the first data quantity is greater than or equal to a first quantity threshold, two rotation axis data are randomly selected from the rotation axis data corresponding to the target absolute value.
[0077] The two rotation axis data randomly selected are taken as first target data, and the rotation axis data corresponding to the target absolute value except the first target data are taken as second target data.
[0078] The first target data is taken as two data points to draw a target straight line.
[0079] The first distances between each rotation axis data in the second target data and the target straight line are determined to obtain a plurality of first distances.
[0080] The first distances greater than or equal to a first distance threshold in the plurality of first distances are determined as first target distances.
[0081] The rotation axis data corresponding to the first target distance in the rotation axis data corresponding to the target absolute value is filtered to obtain the rotation axis data corresponding to the non-planar motion.
[0082] Each rotation axis data stored in the ring buffer is denoted by ω*, and the fourth rotation axis data is denoted as W, The lower right corner code of each rotation axis data ω* represents the collection time of each rotation axis data. For the fourth rotation axis data, in order to ensure the pointing accuracy of the data, the rotation axis data of the IMU generated during the planar motion of the robot is first filtered out from the fourth rotation axis data. The filtering process includes: first determining the absolute value of each rotation axis data in the fourth rotation axis data to obtain a plurality of absolute values, then determining the absolute value greater than or equal to the absolute value threshold from the plurality of absolute values, determining the absolute value greater than or equal to the absolute value threshold as the target absolute value, and then determining the rotation axis data corresponding to the target absolute value from the fourth rotation axis data, that is, the rotation axis data corresponding to the target absolute value in the fourth rotation axis data is generated during the planar motion of the robot.
[0083] After determining the rotation axis data corresponding to the target absolute value, the first number of rotation axis data corresponding to the target absolute value is obtained. If the first data number is less than the first number threshold, it indicates that the number of rotation axis data generated during the planar motion of the robot is too small to realize the subsequent extrinsic parameter update, so the extrinsic parameter update is abandoned and the data needs to be reacquired from the ring buffer. If the first data number is greater than or equal to the first number threshold, it indicates that the number of rotation axis data generated during the planar motion of the robot is sufficient to realize the subsequent extrinsic parameter update.
[0084] In theory, the rotation axis data of the IMU generated during the planar motion of the robot should remain consistent, so under the condition that the first data number is greater than or equal to the first number threshold, the rotation axis data corresponding to the non-planar motion is determined from the rotation axis data corresponding to the target absolute value by using a random consistency sampling algorithm (RANdom SAmple Consensus, RANSAC). The specific process includes:
[0085] Two rotation axis data are randomly selected from the rotation axis data corresponding to the target absolute value, the randomly selected two rotation axis data are taken as first target data, and the rotation axis data other than the first target data in the rotation axis data corresponding to the target absolute value are taken as second target data, then the two rotation axis data in the first target data are taken as two data points, a target straight line is drawn by connecting the two data points, then the first distance between each rotation axis data in the second target data and the target straight line is calculated to obtain a plurality of first distances, and then a first distance greater than or equal to a first distance threshold is determined from the plurality of first distances, the first distance greater than or equal to the first distance threshold is referred to as a first target distance, and the rotation axis data corresponding to the first target distance in the rotation axis data corresponding to the target absolute value is the rotation axis data Date-FP corresponding to the robot during non-planar motion, and the rotation axis data other than the rotation axis data corresponding to the first target distance in the rotation axis data corresponding to the target absolute value is the rotation axis data Date-P corresponding to the robot during planar motion. The direction of each rotation axis data in Date-P is the same.
[0086] After Date-FP and Date-P are obtained, the ratio of the number of Date-P to the number of rotation axis data corresponding to the target absolute value is calculated, if the ratio is less than a preset ratio, it indicates that the rotation axis data in Date-FP is too much, and the external parameter update of the IMU is abandoned, and the rotation axis data in the ring buffer needs to be reselected, if the ratio is greater than or equal to the preset ratio, the rotation axis data in Date-P is sufficient, and the rotation axis data Date-PX of the robot during the rotation motion is determined from Date-P.
[0087] In a possible implementation manner, the above determining the rotation axis data of the robot during the rotation motion from the rotation axis data corresponding to the planar motion to obtain the first rotation axis data includes the following scheme:
[0088] Obtaining the first robot positions respectively associated with the rotation axis data corresponding to the planar rotation motion to obtain a plurality of first robot positions;
[0089] Determining the second distance between two first robot positions at adjacent time points in the plurality of first robot positions to obtain a plurality of second distances;
[0090] Determining the second distance smaller than a second distance threshold in the plurality of second distances as a second target distance, and determining the first robot position corresponding to the second target distance as a target position;
[0091] Determining the rotation axis data corresponding to the target position in the rotation axis data corresponding to the planar rotation motion as the rotation axis data of the robot during the rotation motion to obtain the first rotation axis data.
[0092] For the robot in the process of motion in the production of IMU rotation axis data, the robot also corresponds to a specific pose information, because at the same time, not only can the IMU rotation axis data be collected, but also the robot's odometer can collect the robot's pose information at that time, the pose information is represented as T, T=[x, y, yaw], x represents the horizontal coordinate, y represents the vertical coordinate, and yaw represents the yaw angle. The present application represents the robot position by the pose information, that is, the rotation axis data collected at the same time is associated with the robot position, and each rotation axis data is associated with a robot position.
[0093] After obtaining the corresponding rotation axis data during the planar rotation motion, the first robot position associated with each of the corresponding rotation axis data during the planar rotation motion can be obtained, and a plurality of first robot positions can be obtained. After obtaining a plurality of first robot positions, the distance between two first robot positions at adjacent time points in the plurality of first robot positions is calculated, which represents the change in the pose of the robot. The distance between the two first robot positions at adjacent time points in the plurality of first robot positions obtained by calculation represents the motion radius of the robot at different time points. The greater the distance between the two first robot positions at adjacent time points, the greater the motion radius of the robot at the current time than the motion radius of the robot at the previous time. The smaller the distance between the two first robot positions corresponding to adjacent time points, the closer the size of the motion radius of the robot at the current time to the size of the motion radius of the robot at the previous time, which can be regarded as the same as the motion radius of the robot at the current time and the motion radius of the robot at the previous time.
[0094] The second distance between the two first robot positions at adjacent time points in the plurality of first robot positions is calculated, a plurality of second distances are obtained, a second distance less than a second distance threshold is determined from the plurality of second distances, the second distance less than the second distance threshold is determined as a second target distance, and the first robot position corresponding to the second target distance is determined as a target position.
[0095] After obtaining the target position, the rotation axis data corresponding to the target position in the rotation axis data corresponding to the planar rotation motion is determined as the rotation axis data of the robot during the rotation motion, and the rotation axis data of the robot during the rotation motion is the first rotation axis data.
[0096] In one possible implementation, the external parameter updating method further includes:
[0097] In the case that the robot moves according to the navigation path, the rotation axis data of the inertial measurement unit at different time points is obtained, and the rotation axis data corresponding to the navigation path is obtained; wherein the robot moving according to the navigation path includes planar motion and non-planar motion;
[0098] The rotation axis data corresponding to the navigation path is corrected, and the corrected rotation axis data is stored in the ring buffer in chronological order.
[0099] For the control of the robot, the navigation path needs to be set in advance, and then the robot is controlled to move according to the navigation path. In practice, the movement of the robot according to the navigation path includes planar movement and non-planar movement. In the process of the movement of the robot according to the navigation path, the rotation axis data of the IMU generated at different times is obtained, and the obtained rotation axis data of the IMU generated at different times is referred to as the rotation axis data corresponding to the navigation path. Each rotation axis data corresponding to the navigation path includes the angular velocity of the gyroscope, denoted as ω, ω = [rx, ry, rz], rx represents the pitch angle, ry represents the roll angle, and rz represents the yaw angle. After obtaining the rotation axis data corresponding to the navigation path, each rotation axis data corresponding to the navigation path is corrected to obtain corrected rotation axis data, and then the corrected rotation axis data is stored in the ring buffer in chronological order according to the acquisition time of the data. The corrected rotation axis data is denoted as ω*, ω* = ω - b, b = [bx, by, bz], and b represents the static bias of the IMU collected when the robot is stationary, also referred to as the zero-point bias.
[0100] Each rotation axis data corresponding to the navigation path is corrected, and all the corrected rotation axis data is stored in the ring buffer, thereby realizing efficient storage of data, and the stored data is always the data in the recent period of time. The specific storage process includes:
[0101] 1. Define the ring buffer: create a ring buffer with a fixed size, which can be implemented using an array or a linked list. The ring buffer needs to include a fixed-size storage area and two pointers, which point to the reading position and the writing position of the buffer, respectively.
[0102] 2. Initialize the buffer: set the reading pointer and the writing pointer to the start position of the buffer.
[0103] 3. Collect the rotation axis data of the IMU: continuously read the rotation axis data of the IMU at the required sampling rate.
[0104] 4. Store the data: store the read rotation axis data of the IMU at the position pointed to by the writing pointer, and move the writing pointer one position backward. If the writing pointer reaches the end of the buffer, reset it to the start position of the buffer to realize the ring writing.
[0105] 5. Check the buffer status: after writing data each time, check the position relationship between the reading pointer and the writing pointer. If the reading pointer is equal to the writing pointer, it means that the buffer is full, at which time the oldest data is discarded or overwritten.
[0106] By implementing the above steps, the ring buffer can be used to collect and cache the rotation axis data of the IMU, so that the rotation axis data of the IMU can be continuously stored and accessed, and cyclic writing and reading can be achieved to ensure the continuity of the data.
[0107] In one possible implementation, filtering the first rotation axis data to obtain the second rotation axis data at different positions of the robot during the planar rotation motion includes the following scheme:
[0108] Integrating each rotation axis data in the first rotation axis data to obtain a rotation amount corresponding to each rotation axis data;
[0109] Determine the rotation amount that is less than or equal to the rotation amount threshold value among the rotation amounts corresponding to the respective rotation axis data as the target rotation amount;
[0110] Filtering the rotation axis data corresponding to the target rotation amount in the first rotation axis data to obtain fifth rotation axis data;
[0111] acquiring a second robot position associated with each rotation axis data in the fifth rotation axis data to obtain a plurality of second robot positions;
[0112] determining a second distance between one of the plurality of second robot positions and each of the other second robot positions to obtain a plurality of second distances;
[0113] If the plurality of second distances are all greater than the second distance threshold, the fifth rotation axis data is determined as the second rotation axis data.
[0114] Since the rotation axis data in the first rotation axis data is generated by the robot during the plane rotation motion, the first rotation axis data may include the rotation axis data generated by the robot actually performing the plane rotation motion, which is called true rotation axis data, and may also include the rotation axis data generated by the robot not performing the plane rotation motion, which is called pseudo rotation axis data. For example, when the robot is in plane motion, the rotation axis data generated when the rotation direction keeps changing is pseudo rotation axis data. Figure 3 As shown, Figure 3 The figure shows a schematic diagram of a robot that continuously changes its rotation direction from a top view. 100 represents the robot, and A and B represent two different positions. Assume that the robot is at position A at time T0, at position B at time T1, at position A at time T2, and at position B at time T3. T0>T1>T2>T3 shows that the robot does not rotate in the same direction at time T0-T3, but the rotation direction keeps changing. That is, the rotation axis data obtained at time T0-T3 are pseudo-rotation axis data.
[0115] After obtaining the first rotation axis data, the pseudo rotation axis data in the first rotation axis data is filtered, and the specific process is as follows: the integral of each rotation axis data in the first rotation axis data is obtained to obtain the rotation amount corresponding to each rotation axis data, wherein the integral result of the rotation axis data is the rotation amount, the rotation amount less than or equal to the rotation amount threshold in the rotation amount corresponding to each rotation axis data is determined as the target rotation amount, and the rotation axis data corresponding to the target rotation amount in the first rotation axis data is the pseudo rotation axis data. The pseudo rotation axis data in the first rotation axis data is filtered, and the remaining rotation axis data in the first rotation axis data is the fifth rotation axis data, and the rotation axis data in the fifth rotation axis data is true rotation axis data.
[0116] In order to better estimate the external parameters of the IMU, it is necessary to ensure that the collected rotation axis data is consistent in space. However, when the robot is moving, it may be in plane motion or non-plane motion. Therefore, the present application needs to ensure that the rotation axis data is collected under the premise that the robot is in plane motion. The rotation axis data used to update the external parameters is obtained from the ring buffer every certain time interval, and in order to accurately update the external parameters of the IMU, it is necessary to avoid using the rotation axis data generated when the robot moves at the same position as much as possible.
[0117] Therefore, after obtaining the fifth rotation axis data, it is determined whether the fifth rotation axis data includes rotation axis data from the same position. If so, the external parameter update is abandoned again, and the data is obtained from the ring buffer again. If not, the fifth rotation axis data is used for external parameter update.
[0118] Determining whether the fifth rotation axis data includes rotation axis data from the same position includes: obtaining a second robot position associated with each rotation axis data in the fifth rotation axis data to obtain a plurality of second robot positions, and then calculating a second distance between one of the plurality of second robot positions and each of the other second robot positions. For example, the one of the plurality of second robot positions is the second robot position obtained at the latest time, that is, the second distance between the second robot position at the latest time and each of the other second robot positions is calculated to obtain a plurality of second distances.
[0119] The second distance is represented as D, and the calculation formula is: Wherein, x1 and y1 represent the horizontal coordinate and the vertical coordinate of the one of the plurality of second robot positions, and x2 and y2 represent the horizontal coordinate and the vertical coordinate of the other second robot position.
[0120] After the plurality of second distances are obtained, it is determined whether the plurality of second distances are all greater than the second distance threshold. If not, it indicates that the rotation axis data included in the fifth rotation axis data can have a part generated by the robot planar rotation motion to different positions, and can have another part generated by the robot planar rotation motion at the same position. For example, the robot planar rotation motion at the C position at T1 time, planar rotation motion at the D position at T2 time, and planar rotation motion at the C position at T3 time, then the rotation axis data acquired at T1 time and T3 time is considered to be generated by the robot planar rotation motion at the same position. If yes, it indicates that the rotation axis data in the fifth rotation axis data are all generated by the robot planar rotation motion to different positions, and the fifth rotation axis data is determined as the second rotation axis data, so as to ensure that the rotation axis data used for updating the external parameter is generated by the robot planar rotation motion to different positions.
[0121] In a possible implementation, the above determining, according to the second rotation axis data, the third rotation axis data of the robot during the planar rotation motion on the ground includes the following solutions:
[0122] Acquiring a second data quantity of the rotation axis data in the second rotation axis data;
[0123] If the second data quantity is greater than or equal to the second quantity threshold, determining the rotation axis data acquired at the latest time in the second rotation axis data as third target data, and determining the rotation axis data other than the third target data in the second rotation axis data as fourth target data;
[0124] Determining a rotation axis included angle between each rotation axis data in the third target data and the fourth target data, to obtain a plurality of rotation axis included angles;
[0125] If a first difference between the maximum rotation axis included angle and the minimum rotation axis included angle in the plurality of rotation axis included angles is less than or equal to a first preset difference, determining the second rotation axis data as the third rotation axis data.
[0126] Since the rotation axis data in the second rotation axis data is generated by the robot planar rotation motion at different positions, it can include the rotation axis data generated by the planar rotation motion on the ground, and can also include the rotation axis data generated by the planar rotation motion on the non-ground, where the robot planar rotation motion on the non-ground refers to that the robot planar rotation motion does not contact the ground. In order to prevent the unstable rotation axis data from being collected in a certain area, resulting in the error of external parameter estimation, it is necessary to determine whether the rotation axis data generated by the robot planar rotation motion on the non-ground exists in the second rotation axis data, and the determination includes:
[0127] The second data quantity of the rotation axis data in the second rotation axis data is obtained, and if the second data quantity is greater than or equal to the second quantity threshold, it is indicated that the judgment condition is met, and it is also indicated that the rotation axis data in the second rotation axis data is sufficient. The rotation axis data obtained at the latest time in the second rotation axis data is determined as third target data, that is, the third target data is also the latest obtained data. The rotation axis data in the second rotation axis data except the third target data is determined as fourth target data. Then, the rotation axis included angle between each rotation axis data in the third target data and the fourth target data is calculated, which is represented as θ, and the calculation formula of θ is as follows:
[0128]
[0129] ω n represents the third target data, ω i represents any rotation axis data in the fourth target data.
[0130] After obtaining the plurality of rotation axis included angles, the maximum rotation axis included angle and the minimum rotation axis included angle in the plurality of rotation axis included angles are determined. If the first difference value of the maximum rotation axis included angle and the minimum rotation axis included angle is greater than or equal to the first preset difference value, it is indicated that the consistency of the rotation axis data in the second rotation axis data is poor, and the second rotation axis data can include the rotation axis data generated by the planar rotation movement of the robot on the non-ground surface. If the first difference value of the maximum rotation axis included angle and the minimum rotation axis included angle is less than the first preset difference value, it is indicated that the consistency of the rotation axis data in the second rotation axis data is good, and the difference of the rotation axis data in the second rotation axis data is very small. The second rotation axis data includes the rotation axis data generated by the planar rotation movement of the robot on the ground surface. Therefore, the second rotation axis data is determined as the third rotation axis data during the planar rotation movement of the robot on the ground surface.
[0131] In a possible implementation manner, the current extrinsic parameter data includes preset rotation axis data, and the preset rotation axis data refers to preset calibrated rotation axis data. The above-mentioned extrinsic parameter updating of the inertial measurement unit according to the third rotation axis data and the current extrinsic parameter data of the inertial measurement unit includes the following scheme:
[0132] A second difference value between each rotation axis data in the third rotation axis data and the preset rotation axis data is determined, and a plurality of second difference values are obtained.
[0133] A second difference value greater than a second preset difference value in the plurality of second difference values is determined as a target difference value.
[0134] The rotation axis data corresponding to the target difference value in the third rotation axis data is filtered, and target rotation axis data is obtained.
[0135] The inertial measurement unit is updated according to the target rotation axis data and the current extrinsic parameter data.
[0136] Because the robot will change a little after working in practice due to the pressure and wear of the wheels of the robot, that is, the difference between the actual collected IMU rotation axis data and the preset rotation axis data is small, in order to prevent the extreme case that the difference between the actual collected IMU rotation axis data and the preset rotation axis data is large, the rotation axis data with large difference from the preset rotation axis data in the third rotation axis data needs to be filtered, and the filtering process is as follows:
[0137] The second difference between each rotation axis data in the third rotation axis data and the preset rotation axis data is calculated to obtain a plurality of second differences, the second difference greater than the second preset difference in the plurality of second differences is determined as a target difference, the rotation axis data corresponding to the target difference in the third rotation axis data is the rotation axis data with large difference from the preset rotation axis data, and then the rotation axis data corresponding to the target difference in the third rotation axis data is filtered, the retained rotation axis data in the third rotation axis data is the target rotation axis data, and then the target rotation axis data and the current external parameter data are used to update the external parameter of the IMU, that is, the target rotation axis data participating in the IMU external parameter update does not include the rotation axis data with large difference from the preset rotation axis data, so as to ensure the accuracy of the IMU external parameter update.
[0138] In one possible implementation, the above updating the external parameter of the inertial measurement unit according to the target rotation axis data and the current external parameter data includes:
[0139] determining a quaternion according to the target rotation axis data and the current external parameter data;
[0140] filtering the product of the quaternion and the current external parameter to obtain target external parameter data of the inertial measurement unit;
[0141] replacing the current external parameter data with the external parameter data to update the external parameter of the inertial measurement unit.
[0142] After obtaining the target rotation axis data, the external parameter of the IMU is updated on the basis of the current external parameter data, and the specific process is as follows:
[0143]
[0144]
[0145] wherein, R bi represents the current external parameter data, ω m represents the target rotation axis data, d x , d y , and d z are rotation axes, respectively, and Qupdate =[x,y,z,w],Q update Where x, y, and z are the rotation axes, and w represents the angle of rotation. update It is the update amount for IMU external parameters, that is, quaternion, and the corresponding estimated IMU external parameter data is R1 bi ,
[0146] R1 bi =Q update *R bi ;
[0147] In order to use the rotation axis data in the target rotation axis data to jointly control R1 bi Perform stable updates and use Kalman or complementary filtering to adjust R1 bi Perform smoothing to obtain the target external parameter data, expressed as, R2 bi , assuming the complementary filter gain is gain, then:
[0148] R2 bi =exp(log(Q update )*gain)*R bi ;
[0149] Among them, log and exp represent the conversion function between the rotation Lie algebra (angle axis) expression and quaternion, respectively.
[0150] After obtaining the target external parameter data, use R2 bi Replace R bi , thereby realizing the online update of the external parameters of the IMU, that is, the external parameters of the IMU are updated to R2 bi .
[0151] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0152] Figure 4 FIG. 1 shows a schematic diagram of the structure of an external parameter updating device provided in an embodiment of the present application. For example, Figure 4 As shown, the external parameter updating device 400 is configured on a robot, and the robot includes an inertial measurement unit. The external parameter updating device 400 includes:
[0153] The data acquisition module 410 is used to acquire the rotation axis data of the inertial measurement unit of the robot during the planar rotation movement to obtain the first rotation axis data;
[0154] a data filtering module 420 for filtering the first rotation axis data to obtain the second rotation axis data at different positions of the robot during the planar rotation motion;
[0155] The data determination module 430 is configured to determine third rotation axis data of the robot during the planar rotation motion on the ground according to the second rotation axis data.
[0156] The parameter updating module 440 is configured to update the extrinsic parameters of the inertial measurement unit according to the third rotation axis data and the current extrinsic parameter data of the inertial measurement unit.
[0157] In a possible implementation, the data acquisition module 410 includes:
[0158] The first acquisition unit is configured to acquire rotation axis data from a pre-constructed ring buffer once every interval of a preset time length to obtain fourth rotation axis data, wherein the ring buffer includes rotation axis data of the inertial measurement unit acquired at different times during the planar motion and the non-planar motion of the robot.
[0159] The first determination unit is configured to determine rotation axis data corresponding to the non-planar motion in the fourth rotation axis data.
[0160] The second acquisition unit is configured to filter the rotation axis data corresponding to the non-planar motion from the fourth rotation axis data to obtain rotation axis data corresponding to the planar motion.
[0161] The second determination unit is configured to determine rotation axis data of the robot during the rotation motion from the rotation axis data corresponding to the planar motion to obtain the first rotation axis data.
[0162] In a possible implementation, the first determination unit is specifically configured to: determine absolute values of each rotation axis data in the fourth rotation axis data to obtain a plurality of absolute values; determine an absolute value greater than or equal to an absolute value threshold as a target absolute value; acquire a first data quantity of the rotation axis data corresponding to the target absolute value in the fourth rotation axis data; if the first data quantity is greater than or equal to a first quantity threshold, randomly select two rotation axis data from the rotation axis data corresponding to the target absolute value; take the randomly selected two rotation axis data as first target data, and take the rotation axis data corresponding to the target absolute value and excluding the first target data as second target data; draw a target straight line based on the first target data as two data points; determine a first distance between each rotation axis data in the second target data and the target straight line to obtain a plurality of first distances; determine a first target distance greater than or equal to a first distance threshold from the plurality of first distances; and filter the rotation axis data corresponding to the first target distance in the rotation axis data corresponding to the target absolute value to obtain the rotation axis data corresponding to the non-planar motion.
[0163] In a possible implementation, the second determining unit is specifically configured to: obtain a plurality of first robot positions by obtaining first robot positions respectively associated with the rotation axis data corresponding to the planar rotation motion; determine a plurality of second distances by determining a second distance between two first robot positions at adjacent time points in the plurality of first robot positions; determine a second target distance in the plurality of second distances as a second target distance, and determine a first robot position corresponding to the second target distance as a target position, if the second target distance is less than a second distance threshold; and determine first rotation axis data by determining rotation axis data corresponding to the target position in the rotation axis data corresponding to the planar rotation motion as the rotation axis data of the robot in the rotation motion.
[0164] In a possible implementation, the external parameter updating apparatus 400 further includes:
[0165] The storage unit is configured to obtain rotation axis data of the inertial measurement unit at different time points when the robot moves according to the navigation path, to obtain rotation axis data corresponding to the navigation path, wherein the robot moving according to the navigation path includes planar motion and non-planar motion; correct the rotation axis data corresponding to the navigation path, and store the corrected rotation axis data in the annular buffer in chronological order.
[0166] In a possible implementation, the data filtering module 420 is specifically configured to: obtain a plurality of rotation amounts respectively corresponding to the plurality of rotation axis data in the first rotation axis data by integrating the plurality of rotation axis data; determine a target rotation amount in the plurality of rotation amounts as a target rotation amount, if the target rotation amount is less than or equal to a rotation amount threshold; filter rotation axis data corresponding to the target rotation amount in the first rotation axis data to obtain fifth rotation axis data; obtain a plurality of second robot positions by obtaining a second robot position respectively associated with each rotation axis data in the fifth rotation axis data; determine a plurality of second distances by determining a second distance between one of the plurality of second robot positions and each of the other second robot positions; and determine the fifth rotation axis data as second rotation axis data, if all the plurality of second distances are greater than a second distance threshold.
[0167] In a possible implementation, the data determination module 430 is specifically configured to: obtain a second data quantity of the rotation axis data in the second rotation axis data; if the second data quantity is greater than or equal to a second quantity threshold, determine the rotation axis data obtained at the latest time in the second rotation axis data as third target data, and determine the rotation axis data other than the third target data in the second rotation axis data as fourth target data; determine the rotation axis included angles between each of the third target data and the fourth target data, to obtain a plurality of rotation axis included angles; and if a first difference between a maximum rotation axis included angle and a minimum rotation axis included angle in the plurality of rotation axis included angles is less than or equal to a first preset difference, determine the second rotation axis data as the third rotation axis data.
[0168] In a possible implementation, the current extrinsic parameter data includes preset rotation axis data; and the parameter updating module 440 includes:
[0169] The third determination unit is configured to determine second differences between each of the rotation axis data in the third rotation axis data and the preset rotation axis data, to obtain a plurality of second differences.
[0170] The fourth determination unit is configured to determine, as target differences, the second differences greater than a second preset difference in the plurality of second differences.
[0171] The third acquisition unit is configured to filter the rotation axis data corresponding to the target differences in the third rotation axis data, to obtain target rotation axis data.
[0172] The parameter updating unit is configured to perform extrinsic parameter updating on the inertial measurement unit according to the target rotation axis data and the current extrinsic parameter data.
[0173] In a possible implementation, the parameter updating unit is specifically configured to: determine a quaternion according to the target rotation axis data and the current extrinsic parameter data; filter a product of the quaternion and the current extrinsic parameter, to obtain target extrinsic parameter data of the inertial measurement unit; and replace the current extrinsic parameter data with the target extrinsic parameter data, to perform extrinsic parameter updating on the inertial measurement unit.
[0174] It should be noted that the extrinsic parameter updating apparatus provided in the above embodiments is used to execute the extrinsic parameter updating method of the inertial measurement unit, and the above division of the functional modules is used as an example, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the extrinsic parameter updating apparatus provided in the above embodiments and the extrinsic parameter updating method of the inertial measurement unit belong to the same concept, so for details not disclosed in the device embodiments of the present application, please refer to the above-mentioned extrinsic parameter updating method of the inertial measurement unit, which will not be described here.
[0175] The above embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0176] Figure 5 A structural schematic diagram of a robot provided by an embodiment of the present application is shown, as shown in the figure, the robot 500 includes a memory 501 and a processor 502, wherein the memory 501 stores executable program code 5011, and the processor 502 is configured to invoke and execute the executable program code 5011 to execute an inertial measurement unit extrinsic parameter updating method. Figure 5
[0177] The embodiment can divide the robot into functional modules according to the above method examples, for example, each functional module can be corresponding, or two or more functions can be integrated in one processing module, and the integrated module can be implemented in the form of hardware. It should be noted that the division of the modules in the embodiment is illustrative, and is only a logical function division. In actual implementation, another division mode can be used.
[0178] In the case of dividing each functional module according to each function, the robot can include a data acquisition module, a data filtering module, a data determination module, a parameter updating module, and the like. It should be noted that all related contents of each step involved in the above method embodiments can be cited to the function description of the corresponding functional module, and will not be repeated here.
[0179] The robot provided by the embodiment is used to execute the above inertial measurement unit extrinsic parameter updating method, and thus the same effect as the above implementation method can be achieved.
[0180] In the case of using an integrated unit, the robot can include a processing module and a storage module. The processing module can be used to control and manage the actions of the robot. The storage module can be used to support the robot to execute related program codes and data.
[0181] The processing module can be a processor or a controller, which can realize or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as one or more microprocessor combinations, digital signal processing (digital signal processing, DSP) and microprocessor combinations, etc., and the storage module can be a memory.
[0182] The embodiment also provides a computer readable storage medium, which stores computer program code, when the computer program code runs on the computer, the computer executes the above related method steps to realize the inertial measurement unit extrinsic parameter updating method in the above embodiment.
[0183] The embodiment also provides a computer program product, which, when running on a computer, causes the computer to execute the above related steps to implement the inertial measurement unit extrinsic parameter updating method in the above embodiment.
[0184] In addition, the robot provided by the embodiment of the application can be a chip, a component or a module, and the robot can include a connected processor and a memory; the memory is used to store instructions, and the processor can invoke and execute the instructions when the robot is running, so that the chip executes the inertial measurement unit extrinsic parameter updating method in the above embodiment.
[0185] The robot, the computer readable storage medium, the computer program product or the chip provided by the embodiment can be used to execute the corresponding inertial measurement unit extrinsic parameter updating method provided above, and therefore, the beneficial effects that can be achieved by the robot, the computer readable storage medium, the computer program product or the chip can refer to the beneficial effects of the corresponding inertial measurement unit extrinsic parameter updating method provided above, and will not be described here.
[0186] Through the above description of the embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0187] In the embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, and the division of the modules or units is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection between each other can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0188] The above only describes the specific implementation of the present application, but the protection scope of the present application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for updating an extrinsic parameter of an inertial measurement unit, characterized in that, The application is applied to a robot, and the robot comprises the inertial measurement unit; The external parameter updating method comprises: In the case of robot motion, the rotation axis data of the inertial measurement unit during the planar rotation motion of the robot is acquired to obtain first rotation axis data; The first rotation axis data is filtered to obtain second rotation axis data of the robot at different positions during the planar rotation motion; Third rotation axis data of the robot during the planar rotation motion on the ground is determined according to the second rotation axis data; The inertial measurement unit is updated according to the third rotation axis data and the current external parameter data of the inertial measurement unit.
2. The external parameter update method of claim 1, wherein, The acquisition of the rotation axis data of the inertial measurement unit during the planar rotation motion of the robot to obtain the first rotation axis data comprises: Rotation axis data is acquired from a pre-constructed ring buffer every interval of a preset time length to obtain fourth rotation axis data; wherein the ring buffer comprises rotation axis data of the inertial measurement unit acquired at different times during the planar motion and the non-planar motion of the robot; Corresponding rotation axis data during the non-planar motion is determined in the fourth rotation axis data; The corresponding rotation axis data during the non-planar motion is filtered from the fourth rotation axis data to obtain corresponding rotation axis data during the planar motion; Rotation axis data of the robot during the rotation motion is determined from the corresponding rotation axis data during the planar motion to obtain the first rotation axis data.
3. The external parameter update method of claim 2, wherein, The determination of the corresponding rotation axis data during the non-planar motion in the fourth rotation axis data comprises: The absolute values of each rotation axis data in the fourth rotation axis data are determined to obtain a plurality of absolute values; Absolute values greater than or equal to an absolute value threshold value in the plurality of absolute values are determined as target absolute values; A first data quantity of the rotation axis data corresponding to the target absolute value in the fourth rotation axis data is acquired; If the first data quantity is greater than or equal to a first quantity threshold value, two rotation axis data are randomly selected from the rotation axis data corresponding to the target absolute value; The randomly selected two rotation axis data are taken as first target data, and the rotation axis data corresponding to the target absolute value except the first target data are taken as second target data; A target straight line is drawn based on the first target data as two data points; A first distance between each rotation axis data in the second target data and the target straight line is determined to obtain a plurality of first distances; A first target distance is determined from the first distances greater than or equal to a first distance threshold value; The rotation axis data corresponding to the first target distance in the rotation axis data corresponding to the target absolute value is filtered to obtain the corresponding rotation axis data during the non-planar motion.
4. The external parameter update method of claim 2, wherein, The determination of the rotation axis data of the robot during the rotation motion from the corresponding rotation axis data during the planar motion to obtain the first rotation axis data comprises: A first robot position associated with each of the corresponding rotation axis data during the planar rotation motion is acquired to obtain a plurality of first robot positions; determining a second distance between two first robot positions at adjacent time points in the plurality of first robot positions, to obtain a plurality of second distances; determining a second distance smaller than a second distance threshold value in the plurality of second distances as a second target distance, and determining a first robot position corresponding to the second target distance as a target position; determining rotation axis data corresponding to the target position in the rotation axis data during the planar rotation motion as rotation axis data of the robot during the rotation motion, to obtain the first rotation axis data.
5. The external parameter update method of claim 2, wherein, The extrinsic parameter updating method further comprises: obtaining rotation axis data of the inertial measurement unit at different time points when the robot moves according to the navigation path, to obtain rotation axis data corresponding to the navigation path; wherein the robot moving according to the navigation path comprises planar motion and non-planar motion; correcting the rotation axis data corresponding to the navigation path, and storing the corrected rotation axis data in the ring buffer in chronological order.
6. The external parameter update method of claim 1, wherein, The filtering of the first rotation axis data to obtain second rotation axis data of the robot at different positions during the planar rotation motion comprises: integrating each rotation axis data in the first rotation axis data to obtain a rotation amount corresponding to each rotation axis data; determining a rotation amount smaller than or equal to a rotation amount threshold value in the rotation amount corresponding to each rotation axis data as a target rotation amount; filtering the rotation axis data corresponding to the target rotation amount in the first rotation axis data to obtain fifth rotation axis data; obtaining a second robot position associated with each rotation axis data in the fifth rotation axis data, to obtain a plurality of second robot positions; determining a second distance between one of the plurality of second robot positions and each of the other second robot positions, to obtain a plurality of second distances; if all the plurality of second distances are greater than a second distance threshold value, determining the fifth rotation axis data as the second rotation axis data.
7. The external parameter update method of claim 1, wherein, The determination of third rotation axis data of the robot during the planar rotation motion on the ground according to the second rotation axis data comprises: obtaining a second data quantity of the rotation axis data in the second rotation axis data; if the second data quantity is greater than or equal to a second quantity threshold value, determining rotation axis data obtained at the latest time in the second rotation axis data as third target data, and determining rotation axis data other than the third target data in the second rotation axis data as fourth target data; determining a rotation axis included angle between each rotation axis data in the third target data and the fourth target data, to obtain a plurality of rotation axis included angles; if a first difference between a maximum rotation axis included angle and a minimum rotation axis included angle in the plurality of rotation axis included angles is smaller than or equal to a first preset difference, determining the second rotation axis data as the third rotation axis data.
8. The external parameter update method of any one of claims 1-7, wherein, The current extrinsic parameter data comprises preset rotation axis data; The extrinsic parameter updating of the inertial measurement unit according to the third rotation axis data and the current extrinsic parameter data of the inertial measurement unit comprises: determining a second difference value between each of the third rotation axis data and the preset rotation axis data, to obtain a plurality of second difference values; determining a target difference value from the plurality of second difference values that is greater than a second preset difference value; filtering rotation axis data corresponding to the target difference value in the third rotation axis data to obtain target rotation axis data; performing external parameter updating on the inertial measurement unit according to the target rotation axis data and the current external parameter data.
9. The external parameter update method of claim 8, wherein, The external parameter updating on the inertial measurement unit according to the target rotation axis data and the current external parameter data includes: determining a quaternion according to the target rotation axis data and the current external parameter data; filtering a product of the quaternion and the current external parameter to obtain target external parameter data of the inertial measurement unit; replacing the current external parameter data with the external parameter data to perform external parameter updating on the inertial measurement unit.
10. An external parameter updating device, characterized in that: The external parameter updating device is configured in a robot, and the robot includes the inertial measurement unit, and the external parameter updating device includes: a data acquisition module configured to acquire rotation axis data of the inertial measurement unit during planar rotation of the robot to obtain first rotation axis data when the robot is moving; a data filtering module configured to filter the first rotation axis data to obtain second rotation axis data at different positions of the robot during planar rotation; a data determination module configured to determine third rotation axis data of the robot during planar rotation on the ground according to the second rotation axis data; a parameter updating module configured to perform external parameter updating on the inertial measurement unit according to the third rotation axis data and current external parameter data of the inertial measurement unit.
11. A robot, characterized in that The robot includes: a memory configured to store executable program code; a processor configured to call and run the executable program code from the memory, so that the robot performs the external parameter updating method of the inertial measurement unit according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is executed, the inertial measurement unit external parameter updating method is realized as claimed in any one of claims 1 to 9.