Locating method based on rgb-d sensor and imu sensor

The combination of RGB-D and IMU sensors in the proposed method addresses tracking and zero-drift issues in visual SLAM by integrating IMU pre-integration and loop optimization, ensuring accurate pose estimation for mobile robots in complex environments.

GB2597632BActive Publication Date: 2024-10-09SOUTH CHINA UNIV OF TECH +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
GB2021016617
Authority / Receiving Office
GB · GB
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-03-11
Filing Date
2021-03-10
Publication Date
2024-10-09
Estimated Expiration
2041-03-10

AI Technical Summary

Technical Problem

Visual SLAM algorithms face challenges in tracking feature points during fast motion or pure rotation and suffer from zero-drift issues over long-term motion, leading to deviations in estimated pose, especially when relying solely on camera data without accurate world coordinate system reference.

Method used

A locating method that combines RGB-D sensors and IMU sensors, where IMU pre-integration is used to correct biases and align data, and visual SLAM is employed to initialize the robot's pose, with loop detection and optimization algorithms to refine the robot's state, ensuring accurate tracking and pose estimation in three-dimensional space.

Benefits of technology

The method effectively addresses tracking failures and zero-drift issues by integrating IMU data with visual SLAM, providing reliable and accurate pose estimation for mobile robots, even in complex environments with single backgrounds and long-term motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000001_0000
    Figure 00000001_0000
  • Figure 00000002_0000
    Figure 00000002_0000
Patent Text Reader

Abstract

An RGBD sensor and IMU sensor-based positioning method, which is characterized in that: firstly, a mobile robot carries an RGBD sensor and an IMU sensor to collect data; then, a visual SLAM algorithm is used to initialize data of the RGBD sensor so as to obtain pose information thereof, at the same time data of the IMU sensor is pre-integrated, and the mobile robot is initialized to acquire initial state information thereof; tracking of the pose information, speed, and IMU sensor bias of the mobile robot is optimized on the basis of a re-projection error; meanwhile, a sliding window-based nonlinear optimization algorithm is used to optimize pose information and a map in real time; and loopback detection is added to avoid a situation of zero bias occurring.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS REFERENCE TO RELATED APPLICATION

[0001] The present application claims priority to a Chinese Patent Application No. 202010166801.0, filed on March 11, 2020, entitled “LOCATING METHOD BASED ON RGB-D SENSOR AND IMU SENSOR”, and the entire content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to a technical field of a fusion of a visual simultaneous localization and mapping (SLAM) and a sensor, and in particular, to a locating method based on a red, green, blue, and depth (RGB-D) sensor and an inertial measurement unit (IMU) sensor. BACKGROUND

[0003] SLAM is short for simultaneous localization and mapping, first proposed by SmithSelf and Cheeseman in 1988, and is considered to be the key to realize a truly fully autonomous mobile robot. The application of SLAM techniques can be described as that: a robot starts moving from an unknown location in an unknown environment, locates itself based on location estimation and data acquired by sensors during the moving, and builds incremental maps at the same time. The SLAM that only obtains environmental information via a camera is called a visual SLAM. Since the camera has characteristics of low price, low power consumption, light weight, small size, rich image information and the like, the visual SLAM has been studied by a large number of scholars and experts at home and abroad.

[0004] An IMU is an inertial measurement unit. An IMU sensor will provide a three-axis gyroscope and a three-directional accelerometer to measure angular velocity and acceleration of an object in three-dimensional space, and calculate a posture of the object. The IMU sensor is commonly used in a device that requires motion control, such as vehicles and robots.

[0005] Although a visual SLAM algorithm can estimate its own pose in the three-dimensional space via the data of a camera sensor, the visual SLAM algorithm is easy to miss feature points that are tracked during fast motion or pure rotation. In addition, the visual SLAM generally takes a first frame as a world coordinate system, such that the estimated pose is relative to a 21 05 24 pose of the first frame of image, not the world coordinate system such as local East, North, Up (ENU) Cartesian coordinate system. The IMU sensor can provide pose at each time. However, there is a zero-drift problem during long-term motion, resulting in deviations in the estimated pose. A loop closure in the visual SLAM can solve this problem well. Therefore, the fusion of the visual SLAM and the IMU sensor can estimate the pose of the robot in the unknown space well. SUMMARY

[0006] Aspects of the invention are set out in the appended claims. According to embodiments of the present application, a locating method based on a RGB-D sensor and an IMU sensor is provided.

[0007] The objective of the present application is achieved by the following technical solutions.

[0008] A locating method based on a RGB-D sensor and an IMU sensor is provided. The locating method is applicable to a mobile robot mounted with the RGB-D sensor and the IMU sensor, for locating the mobile robot. The locating method includes the following steps.

[0009] SI, acquiring data via the RGB-D sensor and the IMU sensor. The mobile robot mounted with the RGB-D sensor and the IMU sensor freely moves in a three-dimensional space, and the RGB-D sensor and the IMU sensor acquire data, respectively.

[0010] S2, performing an IMU pre-integration. A keyframe is selected by using a visual SLAM algorithm, according to quality of different frames of image data acquired by the RGB-D sensor. Based on the selected keyframe, a pre-integration of the IMU sensor between keyframes is calculated through an IMU pre-integration equation.

[0011] S3, initializing the mobile robot. A pose of the RGB-D sensor is obtained by initializing the RGB-D sensor using the visual SLAM algorithm, and then an initialized state of the mobile robot is obtained by initializing the mobile robot according to the pose of the RGB-D sensor and the IMU pre-integration of the corresponding keyframe. The state of the mobile robot includes a pose , a velocity of the mobile robot, and a bias of the IMU sensor.

[0012] S4, performing a tracking optimization on a state of the mobile robot. The tracking optimization is performed on the estimated state of the mobile robot by using an optimization algorithm based on reprojection error, and then a nonlinear optimization is performed on the state of the mobile robot by using an optimization algorithm based on slide window.

[0013] S5, performing a loop detection. According to the data acquired by the RGB-D sensor, 21 05 24 a loop optimization is performed on the pose of the RGB-D sensor and feature points by using a loop optimization algorithm based on a bag-of-words model, and then an error term of the IMU sensor is optimized by using an optimization algorithm based on slide window.

[0014] Further, an acquiring frequency of the IMU sensor is greater than an acquiring frequency of the RGB-D sensor. The acquiring frequency of the IMU sensor is above 100Hz. The acquiring frequency of the RGB-D sensor is about 30Hz. Since the acquiring frequency of the IMU sensor is much greater than the acquiring frequency of the RGB-D sensor, the data is required to be aligned through IMU pre-integration.

[0015] Further, a rule of using the visual SLAM algorithm to select the keyframe in the step S2 is as follows: the keyframe is selected according to a frame interval between a current image frame and a previous keyframe acquired by the RGB-D sensor, and the number of common visual feature points between the current image frame and the previous keyframe.

[0016] Further, the IMU pre-integration is calculated in the step S2, an acceleration and an angular velocity is measured by the IME sensor: tm(t) = m(t) + b9(t) + T]9 U(t) = (RWBna(t) - gw) + b\t) +     ’ where m(t) and a(t) represent true values of the angular velocity and the acceleration respectively, m(t) and d(t) represent values of the angular velocity and the acceleration measured by the IMU sensor respectively, RWB represents a rotation matrix when a coordinate system of the IMU sensor is transformed to a world coordinate system, b9(t) and ba(t) represent a gyroscope bias and an accelerometer bias of the IMU sensor over time respectively, T]9(t) and ?]a(t) represent gaussian white noise of a gyroscope and an accelerometer of the IMU sensor over time respectively, and gw represents a gravity vector in the world coordinate system.

[0017] The values measured by the IMU sensor is integrated, and then is discretized according to the acquiring frequency, to obtain: V" = nr nU exp - b‘ - ‘ V) =Vi+gw+&t+ Pj = Pi +         +       +        ~bk~ Tlk^&t2] where b9 and b^ represent the gyroscope bias and the accelerometer bias of the IMU sensor at time k respectively, and T]kd represent gaussian white noise of the gyroscope and the accelerometer of the IMU sensor after being discretized respectively, ARik represents 21 05 24 rotation matrixes from time i to time k, ak and represent discrete values of the acceleration and the angular velocity measured by the IMU sensor respectively, pi, Vt and , R™b represent a displacement, a velocity, and a rotation matrix of the IMU sensor after being discretized at the time i respectively, gw represents the gravity vector in the world coordinate system, and At represents discrete time difference.

[0018] Further, in order to prevent a problem that a variation in data at the previous time causes a re-derivation at the next time, a pre-integration value between the two times is calculated, and the accelerometer bias and gyroscope bias of the IMU sensor are separated. A state at the next time is calculated from a state at a current time through the IMU pre-integration: pwa = rwb^r, i+1Exp(J^bf) J vi+1 = Vt + gw&tii+1 + R^B^vii+1 +Jfvbf +J£vbf) (pi+i = Pi + Mtp+i + ^Qw^li+i + R™B^Pi,i+i +Jipbf +J2pbi) where R™B represents a rotation matrix of a coordinate system B of the IMU sensor when rotated to a world coordinate system at a time i + 1, vi+1 and pi+1 represent a velocity and a pose of the coordinate system B of the IMU sensor at the time i + 1 in the world coordinate system respectively, Mii+1 represents an interval from time i to the time i + 1 of the IMU sensor, bf and bf represent a gyroscope bias and an accelerometer bias of the IMU sensor at the time i respectively, gw represents gravitational acceleration in the world coordinate system, &Rii+1,          and Apii+1 represent pre-integrations of the rotation matrix, a velocity transformation, and a displacement transformation of the IMU sensor from the time i to the time i + 1 respectively, jfR, jfv and represent first-order approximation Jacobian matrixes when A / ?, Av and Ap change with a gyroscope bias bf of the IMU sensor respectively, and Jfv and J£p represent first-order approximation Jacobian matrixes when Av and Ap change with an accelerometer bias bf of the IMU sensor respectively.

[0019] Further, it is necessary to initialize the pose of the RGB-D sensor, the biases and the velocity of the IMU sensor, the gravity vector, and the velocity, and the step S3 includes steps of:

[0020] S31, using the visual SLAM algorithm to initialize the RGB-D sensor, to obtain the pose of the RGB-D sensor, which includes steps of:

[0021] S311, using an ORB feature extraction algorithm to extract ORB feature points of image data acquired by the RGB-D sensor, and finding out three-dimensional space points corresponding to the ORB feature points according to depth data of the RGB-D sensor, thereby obtaining the pose of the RGB-D sensor according to pixel coordinates of the ORB feature points and three-dimensional coordinates of the space points;

[0022] S312, for a space point Xk = [Uk,Vk,Wk]T, its pixel coordinate in a coordinate system of the RGB-D sensor being uk = [xk,yk], and a correlation between the coordinates of the space points and the pixel coordinates being: suk = Kexp(C)Xk , where s represents a scale factor of a depth map, K represents an intrinsic parameter matrix of the RGB-D sensor, f represents an estimated pose, f' represents an antisymmetric matrix corresponding to the pose, and k represents a serial number of the feature point; and

[0023] S313, optimizing the pose of the RGB-D sensor by constructing a least square relation, to minimize an error: 21 05 24 C = argmin^^ ||uk - ^Kexp^Xk || , * where C represents an optimal pose after being optimized, f represents the estimated pose, and n represents the number of feature points;

[0024] S32, selecting consecutive N keyframes according to the visual SLAM algorithm, using the IMU pre-integration equation to integrate gyroscope data of the IMU sensor between the consecutive N keyframes, to obtain a rotation transformation of the IMU sensor between the N keyframes, and estimating a gyroscope bias b9 of the IMU sensor by establishing a minimum error equation of rotation transformations of the RGB-D sensor and the IMU sensor between the Nkeyframes: argmin JX? bg Log ^&RwlExpQ^b<i))T where N represents the number of keyframes, R™B = R™CRCB : R™c represents a rotation of the keyframe i as a rotation of the coordinate system of the RGB-D sensor relative to a world coordinate system obtained by the visual SLAM algorithm, RB^ represents a rotation matrix when the world coordinate system is transformed to a coordinate system of the IMU sensor at the keyframe i + 1, RCB represents a calibrated rotation matrix when a calibrated IMU sensor is transformed to the coordinate system of the RGB-D sensor, Afy j+1 represents a rotation matrix obtained through the IMU pre-integration between two consecutive keyframes, and jfR represents a first-order approximation Jacobian matrix when A / ? changes with the gyroscope bias of the IMU sensor; and 21 05 24

[0025] S3 3, estimating an accelerometer bias and a gravity vector of the IMU sensor by using an estimated result of the gyroscope bias b9 of the IMU sensor, which includes the following steps.

[0026] S331, introducing a gravity constant G, and standardizing a gravity vector^ / = {0,0, —1} in the coordinate system of the IMU sensor and a gravity vector g^ measured by * the IMU sensor through gw = f to calculate a rotation matrix RWI: ll^w II RWI = Exp^vO^) , where RWI represents a direction of the IMU sensor in the world coordinate system, v =          6 = arctan X ‘ 9w) , where v represents a rotation axis of the gravity of the IMU sensor and the gravity vector measured by the IMU sensor, and 0 represents a rotation angle thereof.

[0027] The gravity vector of the IMU sensor may be represented as: 9^ = R^G .

[0028] A gravity disturbance vector 80 is added: 9^ = R^Exp^g.G , where 80 = [80xy 0]T, 80xy = [b0x ^^y]T.

[00010] first-order approximation to gw: gw « RwlgIG — RWI (g^^GSO where (..g^y represents a first-order approximation of the gravity vector eg.

[0029] According to a transformation between the coordinate system C of the RGB-D sensor and the coordinate system B of the IMU sensor: _ W , nWC^C Pb - Pc + K Pb •

[0030] According to an IMU sensor pre-integration calculating equation, the following equation may be established: Pm = Pl + m               +          + (R,^ - R^pi + where J%p represents a first-order approximation Jacobian matrix when Ap changes with the gyroscope bias of the IMU sensor;, p^ represents coordinates of a center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor, pf represents coordinates of a center of the coordinate system of the RGB-D sensor in the world coordinate system at a kay frame i, Vt represents a velocity of the IMU sensor at the keyframe i, R™c represents a rotation matrix of the coordinate system of the RGB-D sensor relative to the world coordinate at the keyframe i, R™B represents a rotation matrix of the coordinate system of the IMU sensor relative to the world coordinate system at the keyframe i, and Mii+1 represents a time interval from the keyframe i to keyframe i + 1 of the IMU sensor.

[0031] According to recurrence relation of the IMU pre-integration equation between three consecutive keyframes, and a transformation equation between the coordinate system of the IMU sensor and the coordinate system of the RGB-D sensor, a linear equation may be obtained: [«(0 ^(i)]       = y(0 , b J where 21 05 24 a(0 — [7 RWI               + ^12^23)]     , ^(0 = ^1^ / ^,3^12^23 + ^2^ / ^23^12 _ ^BJSp12^23 , and / (0 = (.P2 ~ P^^IZ + (.P2 ~ Pl)^23 + 1^2^23^191G^12 + ^23) “     “ ^2C>)Pb^23 + (^2^ — ^3C>)Pb^12 + ^1^^12^12^23 + ^2 B 23 ^12 — RYB^2^23 , where 66xv ^y represents a second-order vector in 66 = 66xv . 0 , 66 represents a gravity deviation vector, ba represents an initialized accelerometer bias of the IMU sensor, RW1 represents a direction of the IMU sensor in the world coordinate system, At12 and At23 represent time intervals from keyframes 1, 2 to keyframes 2, 3 of the IMU sensor respectively, G represents a reference value of gravity, eg represents a gravity vector in the coordinate system of the IMU sensor, []q 1;2) represents that only data of first two columns of a matrix is included, R™B and R™B represent rotation matrixes of the coordinate system of the IMU sensor relative to the world coordinate system at the keyframes 1 and 2 respectively, Ap12 and Ap23 represent displacements of the IMU sensor between the keyframes 1, 2 to the keyframes 2, 3 respectively, Av23 represents a variation in a velocity from the keyframe 2 to the keyframe 3, J%V23, J&P23 and J&P12 represent first-order approximation Jacobian matrixes when Av23, Ap23 and Ap12 change with the accelerometer bias of the IMU sensor respectively, R™c, R™c and R™c represent rotation matrixes of the coordinate system C of the RGB-D sensor relative to the world coordinate system at the keyframes 1, 2, and 3 respectively, pB, pB and p^ represent coordinates of a center of the coordinate system of the RGB-D sensor in the world coordinate system at the keyframes 1, 2, and 3 respectively, and Pb represents coordinates of a center of the coordinate system of the IMU sensor in the 21 05 24 coordinate system of the RGB-D sensor.

[0032] S332, solving a gravity deviation second-order vector 86xy and the accelerometer bias ba through singular value decomposition.

[0033] S333, calculating a velocity v of the 1MU sensor as an initialized velocity of the IMU sensor through an equation: MW = pf -pf+1 -1R“"(5,)XGA^,+I<5e +lR“"s,GAt,?I+1 + (R^ -Wi)Pb+R"^Pi,Hi+ / &>?) ■ where J%p represents a first-order approximation Jacobian matrix when Ap changes with the gyroscope bias of the IMU sensor, pB represents coordinates of the center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor, pf represents coordinates of the center of the coordinate system of the RGB-D sensor in the world coordinate system at the keyframe i, Vt represents the velocity of the IMU sensor at the keyframe i, R^c represents a rotation matrix of the coordinate system of the RGB-D sensor relative to the world coordinate at the keyframe i, R™B represents a rotation matrix of the coordinate system of the IMU sensor relative to the world coordinate system at the keyframe i, and Mii+1 represents a time interval from the keyframe i to the keyframe i + 1 of the IMU sensor.

[0034] Further, the state of the mobile robot includes the velocity, the pose of the mobile robot, and the biases of the IMU sensor. The step S4 includes steps of:

[0035] S41, estimating a pose f of the RGB-D sensor by using the visual SLAM algorithm;

[0036] S42, establishing a constraint relation between keyframes, and establishing a least square relation based on a reprojection error, according to an error term of the IMU sensor and the pose of the mobile robot:

[0037] Eproj(k,j) represents the reprojection error of the pose and the feature points, and is expressed as follows: Epr0j(k,j) = (suk - Kexp^X^T^suk - Kexp^X^ , and Xck = RCBRBW(X™ - pB) + pcB ,

[0038] Eimu^’D represents the error term of the IMU sensor, and is expressed as follows: EiMutj-J) =                   + (e£2Reb) es = Log^RtJExp(j‘Rb‘))T         , ev = RBW(vf - vB -               + J%vbf         , 21 05 24 eP = RiW (Pj-Pt ~ Vi&ti.j ~         ~ Q^Pij +JiPbf         and eb = bj - bt , where k represents a sequence number of a feature point of an image, i represents a sequence number of the keyframe, j represents a sequence number of a current keyframe, s represents a scale factor of a depth map, uk represents two-dimensional coordinates of a kth feature point in a camera coordinate system of the RGB-D sensor, K represents an intrinsic parameter matrix of the RGB-D sensor, represents an antisymmetric matrix of the pose f of the RGB-D sensor, Xk represents coordinates of the kth feature point Xk in a coordinate system C of the RGB-D sensor, Sk represents a scale information matrix of the feature point Xk and a corresponding pixel point, RCB represents a calibrated rotation matrix when a calibrated IMU sensor is transformed to the coordinate system of the RGB-D sensor, RBW represents a rotation matrix of a world coordinate system relative to a coordinate system of the IMU sensor at the keyframe j, X™ represents coordinates of the kth feature point Xk in the world coordinate system W, pf represents coordinates of the IMU sensor in the world coordinate system at the keyframe j, p^ represents coordinates of a center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor, ^Rij, &Vij and &Pt j represent pre-integrations of a rotation matrix, a velocity transformation, and a displacement transformation of the IMU sensor from the keyframe i to the keyframe j respectively, / fR, jfv and represent first-order approximation Jacobian matrixes when A / ?, Av and Ap change with a gyroscope bias of the IMU sensor respectively, J£v and J%p represent first-order approximation Jacobian matrixes when Av and Ap change with an accelerometer bias of the IMU sensor respectively, vf represents a velocity of the IMU sensor at the keyframe j, RjVB represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, b? and bf represent a gyroscope bias and an accelerometer bias of the IMU sensor at the keyframe j respectively, SR and Si represent information matrixes of the biases of the IMU sensor when randomly walking and being pre-integrated respectively, bt and bj represent biases of the IMU sensor at the keyframes i and j respectively, and At(J- represents a time interval from the keyframe i to the keyframe j;

[0039] S43, only establishing a constraint relation between the current keyframe j and an adjacent keyframe j — 1 for a state tracking of the mobile robot at the current keyframe j: 21 05 24 0* = argmin (Sk^projC^j) + E]MU(j - 1,M , and 4> 0 =                     , where 0 represents a set of objects required to be optimized, 0* represents a set of optimized objects (p, k represents a sequence number of the feature point, j represents a sequence number of the current keyframe, R™B represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, p™ represents a translation of the IMU sensor in the world coordinate system at the keyframe j, vf represents the velocity of the IMU sensor at the keyframe j, and b? and b“ represent the gyroscope bias and the accelerometer bias of the IMU sensor at the keyframe j respectively; and a pose of the mobile robot, optimal values of the velocity and the biases of the IMU sensor at the current keyframe are solved, as the state tracking of the mobile robot; and

[0040] S44, since the RGB-D sensor and IMU sensor are required to optimize a state of 9 degrees of freedom, if all the state variables are optimized for all common view keyframes, the amount of calculation is too large to realize real-time locating. In addition, the IMU sensor has zero bias. Thus, the longer the time from data at the current time is, the lower the reliability is.

[0041] Therefore, an optimization algorithm based on slide window is used to non-linearly optimize the state of the mobile robot. For a keyframe M before the current keyframe, a constraint relation between the pose of the mobile robot and the error term of the IMU sensor is established to perform optimization: 0* = argmin (^kEproj(k,j) + EIMU(i,m , and 0 = {R™B,pW,vP,b°,b?} , where (p represents the set of objects required to be optimized, (p* represents the set of optimized objects 0, k represents the sequence number of the feature point, i represents the sequence number of the keyframe, j represents the sequence number of the current keyframe, R™b represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, p™ represents a translation of the IMU sensor in the world coordinate system at the keyframe j, vB represents the velocity of the IMU sensor at the keyframe j, and b? and b“ represent the gyroscope bias and the accelerometer bias of the IMU sensor at the keyframe j respectively.

[0042] For a keyframe before the current keyframe M+l, only a constraint relation between 21 05 24 a pose and feature points of the keyframe that have a common viewpoint with the current keyframe is established to perform optimization: = argmin Zfc^proj(^j) , and where represents the set of objects required to be optimized, and ip* represents the set of optimized objects ip.

[0043] Further, the step S5 includes steps of:

[0044] S51, using a loop detection algorithm based on a bag-of-words model to determine whether there is a loop in an image acquired by the RGB-D sensor at a current keyframe;

[0045] S52, if no loop, outputting a pose of the mobile robot at the current keyframe, ending the loop optimization, and then, tracking a subsequent state of the mobile robot; and if detecting the loop, performing the loop optimization on the pose of the RGB-D sensor and feature points based on the visual SLAM algorithm; and

[0046] S53, optimizing the pose of the mobile robot, the feature points, and the error term of the IMU sensor by using the non-linear optimization algorithm based on sliding window, and outputting the pose of the mobile robot at the current keyframe.

[0047] Compared with the prior art, the present application has advantages and effects as follows.

[0048] According to the locating method based on the RGB-D sensor and the IMU sensor disclosed by the present application, firstly, the RGB-D sensor and the IMU sensor are used to obtain data related to the mobile robot, and then the RGB-D sensor is initialized, the IMU sensor performs the pre-integration, and the mobile robot is initialized. After being initialized, the pose of the mobile robot is tracked and optimized at backend. When the loop is generated, the loop processing is performed to locate the mobile robot. The locating method combines the motion RGB-D sensor and IMU sensor, and overcomes the shortcomings of a pure visual SLAM algorithm being prone to tracking failure when rotating and the background is single, and the IMU sensor generating a zero bias during long-term motion. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] FIG. lisa flowchart illustrating a locating method based on a RGB-D sensor and an IMU sensor according to the present application.

[0050] FIG. 2 is a schematic diagram illustrating a sliding window algorithm used by the 21 05 24 present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] In order to make objectives, technical solutions, and advantages of embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are a part of the embodiments, not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present application.

[0052] Embodiment This embodiment discloses a specific implementation process of a locating method based on a RGB-D sensor and an IMU sensor, which includes steps of SI to S5 as follows.

[0053] At SI, the RGB-D sensor is a Kinect v2 sensor. The Kinect v2 sensor and the IMU sensor are fastened onto a mobile robot, i.e., turtlebot2 mobile robot. The Kinect v2 sensor, the IMU sensor, and the turtlebot2 mobile robot are connected to a mobile laptop via a universal serial bus (USB) interface, to control the turtlebot2 mobile robot to move in three-dimensional space. The Kinect v2 sensor and the IMU sensor acquire data, respectively. An acquiring frequency of the IMU sensor is greater than that of the Kinect v2 sensor.

[0054] At S2, a keyframe is selected by an 0RB-SLAM2 algorithm, according to a frame interval between a current image frame and a previous keyframe acquired by the RGB-D sensor, and the number of common visual feature points between the current image frame and the previous keyframe.

[0055] An acceleration and an angular velocity may be measured from the IMU sensor, and a state at next time from a state at a current time may be calculated through IMU pre-integration. A formula of the calculation is as follows: (C! = RWB^R, ,+iExpUVRb^ J vi+1 = Vt + gw&tii+1 + R^B^vii+1 +J^vbf +J2vbi) (pi+i = Pi +        +^9w^i,i+i + R™B(&Pi,i+i +J%pbf +J^pbi) where R™B represents a rotation matrix of a coordinate system B of the IMU sensor when rotated to the world coordinate system at a time i + 1, vi+1 and pi+1 represent a velocity 21 05 24 and a pose of the coordinate system B of the IMU sensor at the time i + 1 in the world coordinate system respectively, Mii+1 represents an interval from time i to the time i + 1 of the IMU sensor, bf and bf represent a gyroscope bias and an accelerometer bias of the IMU sensor at the time i respectively, gw represents gravitational acceleration in the world coordinate system, &Rii+1,         and Apjj+1 represent pre-integrations of the rotation matrix, a velocity transformation, and a displacement transformation of the IMU sensor from the time i to the time i + 1 respectively, jfR, jfv and represent first-order approximation Jacobian matrixes when the AR, Av and Ap change with a gyroscope bias bf of the IMU sensor respectively, Jfv and Jfp represent first-order approximation Jacobian matrixes when the Av and Ap change with an accelerometer bias bf of the IMU sensor respectively.

[0056] At S3, a pose of the RGB-D sensor, biases and a velocity of the IMU sensor, a gravity vector, and a velocity are initialized. The step S3 includes steps of S31 to S33.

[0057] At S31, a visual ORB-SLAM2 algorithm is used to initialize the RGB-D sensor, to obtain the pose of the RGB-D sensor. The step S31 includes steps of S311 to S313.

[0058] At S311, an ORB feature extraction algorithm is used to extract ORB feature points of image data of the RGB-D sensor, and finding out three-dimensional space points corresponding to the ORB feature points according to depth data of the RGB-D sensor, thereby obtaining the pose of the RGB-D sensor according to pixel coordinates of the ORB feature points and three-dimensional coordinates of the space points.

[0059] At S312, for a space point Xk = [Uk,Vk,Wk]T, its pixel coordinate in a coordinate system of the RGB-D sensor is uk = [xk, yk], and a correlation between the coordinates of the space points and the pixel coordinates is: suk = Kexp^^Xk , where s represents a scale factor of a depth map. K represents an intrinsic parameter matrix of the RGB-D sensor, f represents the estimated pose, represents an antisymmetric matrix corresponding to the pose, and k represents a serial number of the feature point.

[0060] At S313, the pose of the RGB-D sensor is optimized by constructing a least square relation, to minimize an error: I = argmin^^f^ ||uk - ^Kexp^Xk || , where f represents an optimal pose after being optimized, f represents the estimated pose, and n represents the number of feature points.

[0061] At S32, consecutive A key frames are selected according to the visual SLAM algorithm. The IMU pre-integration equation is used to integrate gyroscope data of the IMU sensor between the consecutive N keyframes, to obtain a rotation transformation of the IMU sensor between the N keyframes. The gyroscope bias b9 of the IMU sensor is estimated by establishing a minimum error equation of rotation transformations of the RGB-D sensor and the IMU sensor between the N keyframes: argmin JX? bg / z                                      \  2 Log ^RutlExp(j‘Rb^ R^R^) 21 05 24 where N represents the number of keyframes,          represents a rotation matrix obtained through the IMU pre-integration between the consecutive keyframes i and i + 1, / ar rePresents a first-order approximation Jacobian matrix when △ / ? changes with the gyroscope bias of the IMU sensor, R™B = R™CRCB : R™c represents a rotation of the keyframe i as a rotation of a coordinate system of the RGB-D sensor relative to the world coordinate system obtained by the visual ORB-SLAM2 algorithm, R™ represents a rotation matrix when the world coordinate system is transformed to a coordinate system of the IMU sensor at the keyframe i + 1, and RCB represents a calibrated rotation matrix when a calibrated IMU sensor is transformed to the coordinate system of the RGB-D sensor.

[0062] In this embodiment, two keyframes are used to estimate the gyroscope bias of the IMU sensor, and thus A is 2.

[0063] At S3 3, the accelerometer bias and the gravity vector of the IMU sensor are estimated by using an estimated result of the gyroscope bias b9 of the IMU sensor. The step S33 includes steps of S331 to S333.

[0064] At S331, according to recurrence relation of the IMU pre-integration equation between three consecutive keyframes, and a transformation equation between the coordinate system of the IMU sensor and the coordinate system of the RGB-D sensor, a linear equation can be obtained: [«(0 ^(0] b where a(0 — [7                  + ^12^23)] L2                                                 1(:,1:2) ^(0 —    Jav23^12^23 + ^2'BJSp23^12  ^l'BJSp12^23 ■> and / (0 = (?2 - Pf)Atl2 + (Pf - Pf)^ + -^2^23^9^^2 + ^23) “    “ ^2C^Pb^23 + (^2^C — ^3^C)PB^tl2 +              + ^2^^23^12 — csAP12At23, where 66xv ■^y represents a second-order vector in 66 = 66xv ■^y . 0 , 66 represents a gravity 21 05 24 deviation vector, ba represents an initialized accelerometer bias of the IMU sensor, RWI represents a direction of the IMU sensor in the world coordinate system, At12 and At23 represent time intervals from keyframes 1, 2 to keyframes 2, 3 of the IMU sensor respectively, G represents a reference value of gravity, g, represents a gravity vector in the coordinate system of the IMU sensor, (g / )x represents a first-order approximation of the gravity vector gH [](.1;2) represents that only data of first two columns of the matrix is included, R™B and R™B represent rotation matrixes of the coordinate system of the IMU sensor relative to the world coordinate system at the keyframes 1 and 2 respectively, Ap12 and Ap23 represent displacements of the IMU sensor between the keyframes 1, 2 to the keyframes 2, 3 respectively, Av23 represents a variation in a velocity from the keyframe 2 to the keyframe 3, J&v23> / ap23 and ^Api2 rePresent first-order approximation Jacobian matrixes when Av23, Ap23 and Ap12 change with the accelerometer bias of the IMU sensor respectively, R™c, R™c and R™c represent rotation matrixes of the coordinate system C of the RGB-D sensor relative to the world coordinate system at the keyframes 1, 2, and 3 respectively, pB, p^ and Pi represent coordinates of a center of the coordinate system of the RGB-D sensor in the world coordinate system at the keyframes 1, 2, and 3 respectively, and p^ represents coordinates of a center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor.

[0065] At S332, a gravity deviation second-order vector 66xy and the accelerometer bias ba are solved through singular value decomposition.

[0066] At S333, a velocity v of the IMU sensor is calculated as an initialized velocity of the IMU sensor through an equation: = pf - pf+1 - jR""(p,)xGAt?(+1«e +            + (R^ - R^pl + +JSpb?) ,

[0067] where J%p represents a first-order approximation Jacobian matrix when Ap changes with the gyroscope bias bf of the IMU sensor, p^ represents coordinates of the center of the 21 05 24 coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor, pB represents coordinates of the center of the coordinate system of the RGB-D sensor in the world coordinate system at the keyframe i, Vt represents the velocity of the IMU sensor at the keyframe i, R^c represents a rotation matrix of the coordinate system of the RGB-D sensor relative to the world coordinate at the keyframe i, and R™B represents a rotation matrix of the coordinate system of the IMU sensor relative to the world coordinate system at the keyframe i.

[0068] At S4, a state of the mobile robot is tracked. The state of the mobile robot is optimized by using a non-linear optimization based on sliding window. The state of the mobile robot includes the pose and the velocity of the mobile robot, and the biases of the IMU sensor. The step S4 includes steps of S41 to S43.

[0069] AtS41,pose^ of the RGB-D sensor is estimated by using the visual ORB-SLAM2 algorithm.

[0070] At S42, a constraint relation between the keyframes is established. A least square relation is established based on a reprojection error, according to an error term of the IMU sensor and the pose of the mobile robot.

[0071] Eproj(k,j) represents the reprojection error of the pose and the feature points, and is expressed as follows: Epr0j(k,D = (suk - Kexp(^X^Yk(suk - Kexp^X^) , and X^ = RCBRfw{X^ -pB)+pcB ,

[0072] Eimu^’D represents the error term of the IMU sensor, and is expressed as follows: Eimu^D =                  + (e£2Reb) , e„ = Log^RtjExptJ^bftf        , ev = RBW(vf - vB - gwMi^ - +jfvbf +J^) , eP = RiW (pf-Pi ~      ~        ~ {^Pij +Jtpbf +J^) , and eb = bj - bt , where k represents a sequence number of a feature point of an image, i represents a sequence number of the keyframe, j represents a sequence number of the current keyframe, s represents a scale factor of the depth map, uk represents two-dimensional coordinates of a kth feature point in a camera coordinate system of the RGB-D sensor, K represents an intrinsic parameter matrix of the RGB-D sensor,    represents an antisymmetric matrix of the pose f 21 05 24 of the RGB-D sensor, X% represents coordinates of the kth feature point Xk in a coordinate system C of the RGB-D sensor, represents a scale information matrix of the feature point Xk and a corresponding pixel point, RCB represents a calibrated rotation matrix when a calibrated IMU sensor is transformed to the coordinate system of the RGB-D sensor, RBW represents a rotation matrix of the world coordinate system relative to the coordinate system of the IMU sensor at the keyframe j, X™ represents coordinates of the kth feature point Xk in the world coordinate system W, pB represents coordinates of the IMU sensor in the world coordinate system at the keyframe j, pR represents coordinates of the center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor, ^Rij, &Vij and ^Ptj represent pre-integrations of the rotation matrix, a velocity transformation, and a displacement transformation of the IMU sensor from the keyframe i to the keyframe j respectively, jfR, jfv and represent first-order approximation Jacobian matrixes when A / ?, Av and Ap change with the gyroscope bias of the IMU sensor respectively, J%v and J%p represent first-order approximation Jacobian matrixes when Av and Ap change with the accelerometer bias of the IMU sensor respectively, vf represents a velocity of the IMU sensor at the keyframe j, R™B represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, b? and bf represent a gyroscope bias and an accelerometer bias of the IMU sensor at the keyframe j respectively, and Si represent information matrixes of the biases of the IMU sensor when randomly walking and being pre-integrated respectively, bt and bj represent biases of the IMU sensor at the keyframes i and j respectively, and At(J- represents time difference from the keyframe i to the keyframe j.

[0073] At S43, for the state tracking of the mobile robot at the current keyframe j, only a constraint relation between the current keyframe j and an adjacent keyframe j — 1 is established. 0* = argmin Eproj(k,f) + EIMU(j - 1,    , and 0 = {R™B,pW,vP,b°,b?} , where (p represents a set of objects required to be optimized, (p* represents a set of optimized objects (p, k represents a sequence number of the feature point, j represents a sequence number of the current keyframe, R™B represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, 21 05 24 pf represents a translation of the IMU sensor in the world coordinate system at the keyframe j, vf represents the velocity of the IMU sensor at the keyframe j, and bf and bf represent the gyroscope bias and the accelerometer bias of the IMU sensor at the keyframe j respectively.

[0074] A pose of the mobile robot, and optimal values of the velocity and the biases of the IMU sensor at the current keyframe are solved, as the state tracking of the mobile robot.

[0075] At 4, the state of the mobile robot is non-linearly optimized by using an optimization based on sliding window. For a keyframe M before the current keyframe, a constraint relation between the pose of the mobile robot and the error term of the IMU sensor is established to perform optimization. 0* = argmin (^kEproj(k,j) + EIMU(i,m , and 0 = {RfB,pf,vf,bf,bf} , where (p represents the set of objects required to be optimized, (p* represents the set of optimized objects 0, k represents the sequence number of the feature point, i represents a sequence number of the keyframe, j represents the sequence number of the current keyframe, RfB represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, p™ represents a translation of the IMU sensor in the world coordinate system at the keyframe j, vf represents a velocity of the IMU sensor at the keyframe j , and bf and bf represent the gyroscope bias and the accelerometer bias of the IMU sensor at the keyframe j respectively.

[0076] For a keyframe before the current keyframe M+l, only a constraint relation between the pose and feature points of the keyframe that have a common viewpoint with the current keyframe is established to perform optimization: 0* = argmin YkEprojfcf), and where 0 represents the set of objects required to be optimized, and 0* represents the set of optimized objects 0.

[0077] In this embodiment, the magnitude of M varies with the time interval between the current keyframe and the previous keyframe, and M varies according to the number of key frames within 5 s from the current keyframe.

[0078] At S5, a loop optimization is performed. The step S5 includes steps of S51 to S53. 21 05 24

[0079] At S51, a loop detection algorithm based on the bag-of-words model is used to determine whether there is a loop in an image acquired by the RGB-D sensor at the current keyframe.

[0080] At S52, if no loop, the pose of the mobile robot at the current keyframe is output, the loop optimization is end, and then, the subsequent state of the mobile robot is tracked. If detecting the loop, the loop optimization is performed on the pose of the RGB-D sensor and feature points based on the visual ORB-SLAM2 algorithm.

[0081] At S53, the pose of the mobile robot, the feature points, and the error term of the IMU sensor is optimized by using the non-linear optimization algorithm based on sliding window. The pose of the mobile robot at the current keyframe is output.

[0082] The above embodiments are exemplary embodiments of the present application, but the embodiments of the present application are not limited by the above embodiments. And any other changes, modifications, substitutions, combinations, simplifies, etc. made without departing from the spirit and principle of the present application, all should be considered as equivalent replacement methods, which are all included in the protection scope of the present application.

Claims

1. A locating method based on a RGB-D sensor and an IMU sensor, applicable to a mobile robot mounted with the RGB-D sensor and the IMU sensor, for locating the mobile robot, the locating method comprising steps of:S1, acquiring data via the RGB-D sensor and the IMU sensor, wherein the mobile robot mounted with the RGB-D sensor and the IMU sensor freely moves in a three-dimensional space, and the RGB-D sensor and the IMU sensor acquire data, respectively;S2, performing an IMU pre-integration, wherein a keyframe is selected by using a visual SLAM algorithm, according to quality of different frames of image data acquired by the RGB-D sensor, and based on the selected keyframe, a pre-integration of the IMU sensor between keyframes is calculated through an IMU pre-integration equation;S3, initializing the mobile robot, wherein a pose of the RGB-D sensor is obtained by initializing the RGB-D sensor using the visual SLAM algorithm, and then initialized state of the mobile robot is obtained by initializing the mobile robot according to the pose of the RGB-D sensor and the IMU pre-integration of the corresponding keyframe, and wherein the state of the mobile robot comprises a pose and a velocity of the mobile robot, and a bias of the IMU sensor;S4, performing a tracking optimization on a state of the mobile robot, wherein the tracking optimization is performed on the estimated state of the mobile robot by using an optimization algorithm based on reprojection error, and then a nonlinear optimization is performed on the state of the mobile robot by using an optimization algorithm based on slide window; andS5, performing a loop detection, wherein according to the data acquired by the RGB-D sensor, a loop optimization is performed on the pose of the RGB-D sensor and feature points by using a loop optimization algorithm based on a bag-of-words model, and then an error term of the IMU sensor is optimized by using an optimization algorithm based on sliding window, wherein the step S4 comprises steps of:S41, estimating a pose   of the RGB-D sensor by using the visual SLAM algorithm;S42, establishing a constraint relation between keyframes, and establishing a least square relation based on a rcprojcction error, according to an error term of the IMU sensor and the pose of the mobile robot, wherein:Eproj(k,j) represents the reprojection error of the pose and the feature points, and is expressed as follows:21 05 24TEproj^,j) = (suk - Kexp^Xfc) ^k{suk - Kexp^Xfc) , andXck = rcbrbw(x™ - pB) + pcB ,EIMU(i,j) represents the error term of the IMU sensor, and is expressed as follows:ElMU&f) [^R^v ^p]^l[^R^v ^p]   (^b^R^b) ■>eR = Logf^RijExptfi^         ,ev = RtW(yB - vB - gwMij) - (ev^ +jfvbf + J%vbf) .ep = Rbw (pj-Pi - vBMtj - ^gwEt^ - +Jlpbf + J2pb^ , and eb = bj - bt ,where k represents a sequence number of a feature point of an image, i represents a sequence number of the keyframe, j represents a sequence number of a current keyframe, s represents a scale factor of a depth map, uk represents two-dimensional coordinates of a kth feature point in a camera coordinate system of the RGB-D sensor, K represents an intrinsic parameter matrix of the RGB-D sensor, represents an antisymmetric matrix of the pose of the RGB-D sensor, Xk represents coordinates of the kth feature point Xk in a coordinate system C of the RGB-D sensor, Xk represents a scale information matrix of the feature point Xk and a corresponding pixel point, RCB represents a calibrated rotation matrix when a calibrated IMU sensor is transformed to the coordinate system of the RGB-D sensor, RBW represents a rotation matrix of a world coordinate system relative to a coordinate system of the IMU sensor at the keyframe j, X^ represents coordinates of the kth feature point Xk in the world coordinate system W, pf represents coordinates of the IMU sensor in the world coordinate system at the keyframe j, pB represents coordinates of a center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor, ERij,EVij and Epi j represent pre-integrations of a rotation matrix, a velocity transformation, and a displacement transformation of the IMU sensor from the keyframe i to the keyframe j respectively, ]^R,]^V and represent first-order approximation Jacobian matrixes when AR, Av and Ep change with a gyroscope bias of the IMU sensor respectively, and ]^p represent first-order approximation Jacobian matrixes when Av and Ep change with an accelerometer bias of the IMU sensor respectively, vf represents a velocity of the IMU sensor at the keyframe j, R™B represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, b? and bf represent21 05 24a gyroscope bias and an accelerometer bias of the IMU sensor at the keyframe j respectively, l.R and 2] represent information matrixes of biases of the IMU sensor when randomly walking and being pre-integrated respectively, bt and bj represent biases of the IMU sensor at the keyframes i and; respectively, and Apj represents a time interval from the keyframe i to the keyframe / ;S43, only establishing a constraint relation between the current keyframe j and an adjacent keyframe j — 1 for a state tracking of the mobile robot at the current keyframe j:<P* = argmin (%kEproj(k,f) + EIMU(j - 1, / )} , and0 =     ,pY,vf,bf,bf] ,where (p represents a set of objects required to be optimized, (p* represents a set of optimized objects (p. k represents a sequence number of the feature point, j represents a sequence number of the current keyframe, R™B represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j, p™ represents a translation of the IMU sensor in the world coordinate system at the keyframe j, vf represents the velocity of the IMU sensor at the keyframe j, and b? and bf represent the gyroscope bias and the accelerometer bias of the IMU sensor at the keyframe j respectively, anddetermining a pose of the mobile robot, and optimal values of the velocity and the biases of the IMU sensor at the current keyframe, as the state tracking of the mobile robot; andS44, using an optimization based on sliding window to non-linearly optimize the state of the mobile robot, and establishing a constraint relation between the pose of the mobile robot, the feature points, and the error term of the IMU sensor to perform optimization for a keyframe M before the current keyframe:(p* = argmin(?,kEproj(k,j) + EIMU(i,j)j , andcp = [R^B,pY,VjB,bf,b^ .where (p represents the set of objects required to be optimized, (p* represents the set of optimized objects (p. k represents the sequence number of the feature point, i represents the sequence number of the keyframe, j represents the sequence number of the current keyframe, R™3 represents a rotation matrix of the coordinate system B of the IMU sensor when rotated to the world coordinate system at the keyframe j. p™ represents a translation of the IMU sensor in the world coordinate system at the keyframe j, vB represents the velocity21 05 24of the IMU sensor at the keyframe j, and b? and bf represent the gyroscope bias and the accelerometer bias of the IMU sensor at the keyframe j respectively,only establishing a constraint relation between a pose and feature points of the keyframe that have a common viewpoint with the current keyframe to perform optimization for a keyframe before the current keyframe M+l:= argminYkEproj(k,j) , and'P^{R^} ,where ip represents the set of objects required to be optimized, and ip* represents the set of optimized objects ip.

2. The locating method of claim 1, wherein an acquiring frequency of the IMU sensor is greater than an acquiring frequency of the RGB-D sensor.

3. The locating method of claim 1, wherein a rule of using the visual SUAM algorithm to select the keyframe in the step S2 is as follows: the keyframe is selected according to a frame interval between a current image frame and a previous keyframe acquired by the RGB-D sensor, and the number of common visual feature points between the current image frame and the previous keyframe.

4. The locating method of claim 1, wherein the IMU pre-integration is calculated in the step S2, a state at next time is calculated from a state at a current time through the IMU pre-integration by a formula as follows:(C? = RWB^R, i+1Exp(j9Rb9)) vi+1 = Vi + gwMi>i+1 + R^b(Avu+1 +Jivbf[pi+i = Pi+v^hi+i+^9w^ii+i+«rs(Mi+i+j&Pbfwhere represents a rotation matrix of a coordinate system B of the IMU sensor when rotated to a world coordinate system at a time i + 1, iy+1and pi+1 represent a velocity and a pose of the coordinate system B of the IMU sensor at the time j + 1 in the world coordinate system respectively, represents an interval from a time i to the time i + 1 of the IMU sensor, bf and b? represent a gyroscope bias and an accelerometer bias of the IMU sensor at the time i respectively, gw represents a gravitational acceleration in the worldcoordinate system; A Rii+1, A vii+1 and represent pre-integrations of the rotation21 05 24matrix, a velocity transformation, and a displacement transformation of the IMU sensor from the time i to the time i + 1 respectively, J&R, J^v and represent first-order approximation Jacobian matrixes when AR, Av and Ap change with a gyroscope bias bf of the IMU sensor respectively, and and J2p represent first-order approximation Jacobian matrixes when Av and Ap change with an accelerometer bias b? of the IMU sensor respectively.

5. The locating method of claim 1, wherein the step S3 comprises steps of:S31, using the visual SUAM algorithm to initialize the RGB-D sensor, to obtain the pose of the RGB-D sensor, which comprises steps of:S311, using an ORB feature extraction algorithm to extract ORB feature points of image data acquired by the RGB-D sensor, and finding out three-dimensional space points corresponding to the ORB feature points according to depth data of the RGB-D sensor, thereby obtaining the pose of the RGB-D sensor according to pixel coordinates of the ORB feature points and three-dimensional coordinates of the space points;S312, for a space point Xk = [Uk, Vk, Wk]T, its pixel coordinate in a coordinate system of the RGB-D sensor being uk = [xk,yk], and a correlation between the coordinates of the space points and the pixel coordinates being:suk = Kexp(C)Xk ,where s represents a scale factor of a depth map, K represents an intrinsic parameter matrix of the RGB-D sensor, represents estimated pose, represents an antisymmetric matrix corresponding to the pose, and k represents a serial number of the feature point; andS313, optimizing the pose of the RGB-D sensor by constructing a least square relation, to minimize an error:= argmin^?^ ||uk -)¾|| ,*where C represents an optimal pose after being optimized, f represents the estimated pose, and n represents the number of feature points;S32, selecting consecutive N keyframes according to the visual SUAM algorithm, using the IMU pre-integration equation to integrate gyroscope data of the IMU sensor between the consecutive N keyframe s, to obtain a rotation transformation of the IMU sensor between the N keyframes, and estimating a gyroscope bias b3 of the IMU sensor by establishing a minimum error equation of rotation transformations of the RGB-D sensor and the IMU sensor between21 05 24the N keyframes: / / \T \ 2argmin Log \(hRu+1Exp(jlRb<m R^VB , hg                 \                                       7where N represents the number of keyframes, ^Ri^+i represents a rotation matrix obtained through the IMU pre-integration between a keyframe i and a keyframe i + 1, J&R represents a first-order approximation Jacobian matrix when AR changes with a gyroscope bias of the IMU sensor, R^B = R™CRCB: R™c represents a rotation of the keyframe i as a rotation of the coordinate system of the RGB-D sensor relative to a world coordinate system obtained by the visual SLAM algorithm, R™ represents a rotation matrix when the world coordinate system is transformed to a coordinate system of the IMU sensor at the keyframe i + 1, and Rcb represents a calibrated rotation matrix when a calibrated IMU sensor is transformed to the coordinate system of the RGB-D sensor; andS3 3, estimating an accelerometer bias and a gravity vector of the IMU sensor by using an estimated result of the gyroscope bias b3 of the IMU sensor, which comprises steps of:S331, according to recurrence relation of the IMU pre-integration equation between three consecutive keyframes, and a transformation equation between the coordinate system ofthe IMU sensor and the coordinate system of the RGB-D sensor, obtaining a linear equation:[«(0 15(i)] *y = Y& ’ bawherea(0 — Ir^^C^xGCAt^A^s + ^12^23)]L2                                                     -1(:,1:2)15(0 = ^ / ^12^23 + ^ / ^12 -        , and / (0 = (P2 - P3)^12 + (P2 - Pl )^23 + |At12At23«ly / R / G(At12 + At23) -(RWC - R™c)pcBM23 + (R^ - R^c}pcBM12 + RfBAv12At12At23 + R^B^p23M12 -R^b Ap12At23where 86xy represents a second-order vector in 86 =86xv. 086 represents agravity deviation vector, ba represents an initialized accelerometer bias of the IMU sensor, RWI represents a direction of the IMU sensor in the world coordinate system, At12 and At23represent time interval from keyframes 1, 2 to keyframes 2, 3 of the IMU sensor respectively, G represents a reference value of gravity, gj represents a gravity vector in the coordinate system of the IMU sensor; (gOx represents a first-order approximation of the gravity vector gh 0(:,1:2) represents that only data of first two columns of a matrix is included, R^B andR^B represent rotation matrixes of the coordinate system of the IMU sensor relative to the21 05 24world coordinate system at the keyframes 1 and 2 respectively, Ap12 and Ap23 represent displacements of the IMU sensor from the keyframes 1, 2 to the keyframes 2, 3 respectively, Av23 represents a variation in a velocity from the keyframe 2 to the keyframe 3, J%V23, J&P23 and J&P12 represent first-order approximation Jacobian matrixes when Av23, Ap23 and Ap12 change with the accelerometer bias of the IMU sensor respectively, R™c, R™c and R™c represent rotation matrixes of the coordinate system C of the RGB-D sensor relative to the world coordinate system at the keyframes 1, 2, and 3 respectively, p±,P2 and p^ represent coordinates of a center of the coordinate system of the RGB-D sensor in the world coordinate system at the keyframes 1, 2, and 3 respectively, and p£ represents coordinates of a center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor;S332, solving a gravity deviation second-order vector 86xy and the accelerometer bias ba through singular value decomposition; andS333, calculating a velocity v of the IMU sensor as an initialized velocity of the IMU sensor through an equation:^Atu+1 = p^ - pf+1 - -2Rw\g^G8tli+18Q + ±Rw,g,GM?i+1 +     "where j£p represents a first-order approximation Jacobian matrix when Ap changes with the gyroscope bias of the IMU sensor, p^ represents coordinates of the center of the coordinate system of the IMU sensor in the coordinate system of the RGB-D sensor, pf represents coordinates of the center of the coordinate system of the RGB-D sensor in the world coordinate system at the keyframe i, Vj represents the velocity of the IMU sensor at the keyframe i, R^c represents a rotation matrix of the coordinate system of the RGB-D sensor relative to the world coordinate at the keyframe j, R^B represents a rotation matrix of the coordinate system of the IMU sensor relative to the world coordinate system at the keyframe j, and At; i+1 represents a time interval from the keyframe i to the keyframe i + 1 of the IMU sensor.

6. The locating method of claim 1, wherein the step S5 comprises steps of:S51, using a loop detection algorithm based on a bag-of-words model to determine whether there is a loop in an image acquired by the RGB-D sensor at a current keyframe;S52, if no loop, outputting a pose of the mobile robot at the current keyframe, ending the loop optimization, and then, tracking a subsequent state of the mobile robot; and if detecting the loop, performing the loop optimization on the pose of the RGB-D sensor and the featurepoints based on the visual SLAM algorithm; andS53, optimizing the pose of the mobile robot, the feature points, and the error term of the IMU sensor by using the non-linear optimization algorithm based on sliding window, and outputting the pose of the mobile robot at the current keyframe.21 05 24

Citation Information

Patent Citations

  • SLAM system based on multi-view panoramic inertia navigation

    CN108846867A

  • Panoramic inertial navigation SLAM method based on multiple key frames

    CN109307508A

  • Pose estimation method based on RGB-D and IMU information fusion

    CN109993113A

  • Robot positioning method with fusion of visual features and IMU information

    CN110345944A

  • Positioning method based on RGBD sensor and IMU sensor

    CN111462231A