Method of constructing a model of the motion of a mobile device and related systems
11625870 · 2023-04-11
Assignee
Inventors
Cpc classification
G01C22/02
PHYSICS
International classification
G01C22/02
PHYSICS
Abstract
A computer-implemented method 1000 of constructing a model of the motion of a mobile device, wherein the method comprises using a sensor of the device to obtain 1002 positional data providing an estimated pose of the mobile device, generating an initial graph 1004 based upon the positional data from the sensor, nodes of which graph provide a series of possible poses of the device, and edges of which graph represent odometry and/or loop closure constraints; processing the graph to estimate 1006 confidence scores for each loop closure by performing pairwise consistency tests between each loop closure and a set of other loop closures; and generating an augmented graph from the initial graph by retaining or deleting 1008 each loop closure based upon the confidence scores.
Claims
1. A computer-implemented method of constructing a model of the motion of a mobile device, wherein the method comprises: using a sensor of the device to obtain positional data providing an estimated pose of the mobile device; generating an initial graph based upon the positional data from the sensor, nodes of which graph provide a series of possible poses of the device, and edges of which graph represent odometry and/or loop closure constraints; processing the graph to estimate confidence scores for each loop closure by performing pairwise consistency tests between each loop closure and a set of other loop closures; and generating an augmented graph from the initial graph by: retaining or deleting each loop closure based upon the confidence scores, and inserting artificial loop closure edges into the graph between pairs of retained loop closures.
2. A method according to claim 1 in which the artificial loop closures are created by selecting one or more pairs of nodes of the graph and calculating an edge to link the pair of nodes, each new edge representing a new loop closure.
3. A method according to claim 2 in which the artificial edges are calculated by determining a transformation that transforms the pose of a first node of the pair to a pose of second node of the pair.
4. A method according to claim 1 in which the consistency checks performed between pairs of nodes are spatial consistency checks.
5. A method according to claim 1 in which the estimated pose of the mobile device is determined relative to the initial pose of the device.
6. A method according to claim 1, in which the loop closure is deleted from the graph if its confidence score is below a first level and retained if the confidence score is above the first level, and wherein optionally the first level is fixed or learned.
7. A method according to claim 1, in which the loop closures are clustered into two groups using k-means clustering, and the loop closures in the group with the lower centre value are deleted from the graph.
8. A method according to claim 7 in which the loop closure is retained if it is in the group with the higher centre value.
9. A method according to claim 1 in which a pair of loop closures is used to seed the generation of artificial loop closures if the confidence scores are above a second level, and wherein optionally the second level may be fixed or learnt from the data.
10. The method of claim 1, in which the loop closures are clustered into two groups using k-means clustering, and the loop closures in the group with the lower centre value are deleted from the graph, wherein which a pair of loop closures is used to seed the generation of artificial loop closures if the confidence scores are above a second level, and wherein optionally the second level may be fixed or learnt from the data and the second level is the centre value of the group with the higher centre value.
11. A method according to claim 1 further comprising using the augmented graph to generate a model of the internals of a building.
12. A method according to claim 1 further comprising using the augmented graph to allow a first device of one or more mobile devices to localise itself with respect to the trajectories of the other mobile devices.
13. A method according to claim 1 in which the device is arranged to be carried by a person, robot, or vehicle or to be a part of, a vehicle or robot able to move itself.
14. A machine-readable medium containing instructions which, when read by a processor, cause that processor to implement a method of constructing a model of the motion of a mobile device, wherein the method comprises: using a sensor of the device to obtain positional data providing an estimated pose of the mobile device; generating an initial graph based upon the positional data from the sensor, nodes of which graph provide a series of possible poses of the device, and edges of which graph represent odometry and/or loop closure constraints; processing the graph to estimate confidence scores for each loop closure by performing pairwise consistency tests between each loop closure and a set of other loop closures; and generating an augmented graph from the initial graph by: retaining or deleting each loop closure based upon the confidence scores, and inserting artificial loop closure edges into the graph between pairs of retained loop closures.
15. A system comprising a processor arranged to perform the following steps: obtain an initial graph based upon positional data from a sensor of a mobile device, nodes of which graph provide a series of possible poses of the device, and edges of which graph represent odometry and/or loop closure constraints; process the graph to estimate confidence scores for each loop closure by performing pairwise consistency tests between each loop closure and a set of other loop closures; and generate an augmented graph from the initial graph by retaining or deleting each loop closure based upon the confidence scores, and inserting artificial loop closure edges into the graph between pairs of retained loop closures.
16. The system of claim 15, wherein the processor is further arranged to insert artificial loop closures into the graph between pairs of retained loop closures.
17. The system of claim 16, wherein the processor is further arranged to identify a subset of the retained loop closures based on the confidence scores, and to use only loop closures in the subset of the retained loop closures to seed artificial loop closures.
18. The system of claim 15, further comprising: the mobile device, wherein the mobile device comprises, or has mounted thereon, the sensor which is arranged to provide the positional data, and the mobile device is a mobile telephone, smart watch, inertial measurement unit (IMU), or smart camera.
19. The system of claim 15, wherein the system is provided by the mobile device, wherein the mobile device comprises, or has mounted thereon, the sensor which is arranged to provide the positional data and the processor.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) There now follows by way of example only a detailed description of embodiments of the present invention with reference to the accompanying drawings in which:
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15) The embodiment being described implements a middle layer, embedded between front- and back-ends, to boost the robustness of a SLAM (Simultaneous Localisation And Mapping) system. In many embodiments, the embedding is such that identical front- and back-ends can be used as in the prior art. The skilled person will appreciate that embodiments need not be implemented in a so-called middle layer and could be provided as part of other elements, or indeed in other topologies.
(16) Embodiments are described in relation to the localisation of one or more devices moving in an environment. Here, a device may be any device capable of providing data giving an estimate of the device position; i.e. positional data. Such a device may be carried by a person (e.g. smartphone/smartwatch), a robot (e.g. ground/aerial) or an object (e.g. wheelchair). The skilled person will appreciate that there is a level of uncertainty in the data provided by any sensor, and whilst some sensor modalities are more accurate than others, the positional data will only give an estimate of the device position. The positional data may be generated from any suitable sensor but in particular the sensor may be any of the following examples: magnetometers; accelerometers, gyroscopes, WIFI, GSM (Global System for Mobile communication), UMTS (Universal Mobile Telecommunication System), LTE (Long Term Evolution), cameras, GPS (Global Positioning System—including GLONASS, Galileo, BeiDou-2, etc.), LiDAR (Light Detection and Ranging), cameras, and the like.
(17) Conveniently, the device is arranged to process positional data locally using processing circuitry that is part of that device. However, it is conceivable that the positional data is processed remote from the device, or indeed partially processed on the device and partially processed remote from the device. The skilled person will appreciate how to modify embodiments to split the processing between devices and in view of this the following description is agnostic as to where the processing is performed. The skilled person will appreciate that a mobile device may simply gather and transmit sensor data for remote processing, and may not perform any significant data processing locally.
(18) Embodiments which process positional data remotely will typically have a network connection thereto. Such a network connection will likely be provided by technologies including GSM; UMTS; LTE; WIFI; Bluetooth; or the like.
(19) In summary, embodiments are arranged to alter a pose graph (conveniently referred to as a graph herein). Conveniently, the pose graph is generated by a front-end. Further conveniently, the altered graph can then be optimised by a back-end system.
(20) Extensive experiments have been conducted to demonstrate the significantly improved accuracy and robustness compared with state-of-the-art methods and various back-ends, verifying the effectiveness of the proposed approach (see
(21) I. System Overview
(22) For the avoidance of doubt,
(23) The embodiment being described therefore does not model the environment 102 per se, but rather the motion of one or more devices 101 in the environment. The skilled person will appreciate that, indirectly, this can allow estimation of an approximate map of the environment 102, especially when a large number of devices 101 or of trajectories of the same device 101 pass through the environment. For example, this could be used for the generation of approximate floorplans based on crowdsourced data, or other collection mechanisms of data.
(24) Three loop closures, L1, L2 and L3, are marked, where a loop closure, as the skilled person will appreciate, can be thought of as a determination that the device has previously visited that location, within a degree of confidence.
(25)
(26)
(27) In
(28) Although the longest loop closure (L3) in
(29) The same applies to newly inserted (artificial) loop closures; in embodiments being described, a transformation for an artificial loop closure is calculated with a probability propagation method, for example an RTS smoother.
(30) The skilled person will appreciate that a distance between two end-points of a loop closure is not necessarily short—the nodes do not necessarily have to be physically “close”. Where the transformation indicated by the loop closure is similar to ground truth, the loop closure is correct. In
(31) Many false positives result from two places which are far from each other but which have certain features in common; similar observations of the two different places can be obtained due to insufficient features in the observation, leading the approach used to think that the two places are close or the same.
(32) Further, the definition of “close” can vary between embodiments, and it is not necessary for the two poses to be physically close (there may be no specific requirement on distance, such as 1 or 2 meters). Whether or not there is a loop closure may, in some embodiments, be determined by the confidence in the positional data, or other similar constraints. The loop closure expresses the transformation (position and orientation) constraint between two poses (from single or multiple devices). Once the transformation can be calculated accurately, the physical distance is not important.
(33) In the embodiment being described, this is normally assessed in two steps: (i) First, a loop closure is detected between two poses (graph nodes) by checking sensor data similarity, e.g., looking at image appearance and magnetic magnitude; and (ii) Then, if the similarity is high, the transformation between the two poses (graph nodes) is calculated. This transformation can be determined in the front-ends by using different techniques, which depend on the sensor type, system requirement, and even operating environment etc.
(34) The same applies for the artificial loop closures discussed below and their transformations are calculated with a probability propagation method—in this case an Rauch-Tung-Striebel (RTS) smoother.
(35) In
(36)
(37) In
(38) It can be seen that the system architecture 300 of the embodiment being described (one implementation of the embodiments provided here is provided by the Graph-Tinker (GTk) algorithm provided by the inventors) has an extra portion 310 as compared to the prior art system architecture 30. That is, the embodiment being described is implemented as a middle layer 310 between a SLAM front-end 24 and back-end 38.
(39) The prior art architecture 30 takes raw data 32 and passes this to a SLAM front-end 34. An initial graph 37 (a pose graph) is then formed by a graph module 36 of the front-end 34, the initial graph 37 including pose nodes, odometry edges and loop-closure edges. The pose nodes may conveniently be referred to as nodes and provide what may be thought of as a possible position and orientation of the device at a given instance.
(40) Typically, a node has an associated probability function that gives the probability of a device being at that position. In the pose graph of the embodiment being described, all the nodes are modelled as a Gaussian distribution which uses a mean and covariance matrix to represent the probability of the position or pose of this node.
(41) This graph 37 is then passed to a SLAM back-end 38. The SLAM back-end 38 performs further processing and outputs a final graph 39.
(42) In the embodiment being described, the same raw data 32 is passed to a SLAM front-end 34, in the same manner as in the prior art. Indeed the front-end 34 may be the same front end as that used in the prior-art. Should the same front end be used, the same graph 37 as for the prior art system 30 is then formed by the graph module 36 of the front-end 34, the graph 37 including pose nodes, odometry edges and loop-closure edges.
(43) However, in the embodiment being described, this initial graph 37 is not passed directly to the back-end 38, but rather to a middle layer 310.
(44) As described in more detail below, the middle layer 310 performs outlier rejection at an outlier rejection module 302. The outlier rejection module 302 detects and eliminates inconsistent loop closures (i.e. outliers—for example line 303 which may be thought of as being equivalent to the loop closure L3 of
(45) Inlier injection is then performed on the consistent subgraph 305 by an inlier injection module 306. A set of artificial loop closures are reconstructed and inserted through the inlier injection module 306, generating 308 an augmented graph 307.
(46) The augmented graph 307 includes pose nodes, odometry edges, consistent loop closures (the original loop closures deemed to be correct) and injected loop closures (loop-closures generated based on the original loop closures deemed to be correct). The injected loop closures within the augmented graph 307 facilitate a more robust output from the back-end 38 in view of more positive loop closures (see for example region 311 of graph 307).
(47) In the embodiment being described, the augmented graph 307 is then passed to the back-end 38 as used in the prior art architecture 30. As the augmented graph 307 is more accurate than the first (initial) graph 37, the final graph 309 output by the back-end 38 in the embodiment being described is different from that output by the prior art system 30, even if an identical back-end 38 is used to the prior art system 30. Here, the final graph 309 provides what may be thought of as a model of the motion of the device 101 through its environment.
(48) The skilled person will appreciate that embodiments may use trajectories of a plurality of devices—a loop closure may indicate that one device, A, is in the same place as another device, B, was previously (or at least in a place sufficiently close and well-identified for a transformation between the two to be calculated with confidence); the trajectories used to form loops may not have been travelled by the same device.
(49) The three pose graphs 37, 305, 307 give an example using the MIT-Killian-Court dataset. Dashed 303 and dash-dotted 311 lines represent false-positive and injected loop closures, respectively.
(50)
(51) Conveniently, embodiments structure themselves as a middle layer 310 which is a complement to prior art back-ends 38, and which can operate in tandem with them. However, the skilled person will appreciate that the concepts described herein need not be so structured.
(52) The middle layer 310 of the embodiment being described takes, as its input, an initial pose graph 36, 37 from a front end 34 (i.e., in at least this embodiment, a process that generates a pose graph 36, 37) and outputs an augmented pose graph 307 for use by the back-end 38.
(53) From the description of
(54) The generation of artificial loop closures can be thought of as the identification of correct but previously undetected loop-closures. The inlier injection module 306 uses the known loop closures in which there is confidence along with odometry data to establish which other pose nodes are actually nearby, and the transformations between them, and injects these as additional loop closures.
(55) The division of loop closures into subsets (outliers, and then separating the consistent loop closures (inliers) into a subset to be used to generate artificial loop closures and the remainder) is performed as described below in the embodiment being described:
(56) After calculating the pass rate of each loop closure, k-means clustering is used to classify all loop-closure into two groups according to the pass rate. Based on k-means, each group has a centre value. The group with a higher centre value of pass rate is regarded as the group containing correct loop-closures and is called the inlier group while the other group is call outlier group, and is rejected.
(57) More specifically, the following steps are followed in this embodiment: i) Class loop closure as outlier and reject it if it is in the outlier group; ii) Preserve loop closure but do not use it for artificial loop closure generation if it is in the inlier group but its pass rate is lower than the centre value of the inlier group; iii) Preserve loop closure and additionally use it for artificial loop closure generation if it is in the inlier group and its pass rate is higher than the centre value of the inlier group.
(58) Thus, in the embodiment being described, the middle layer 310 generates what may be thought of as an augmented pose graph 307, 308, which augmented pose graph 308 is then passed to a SLAM back-end 38 for the back-end 38 to calculate appropriate device poses through optimisation. The embodiment being described used g2o in the back-end 38 (as described in R. Kummerle, G. Grisetti, H. Strasdat, K. Konolige, and W. Burgard, “g 2 o: A general framework for graph optimization,” in Robotics and Automation (ICRA), 2011 IEEE International Conference on. IEEE, 2011, pp. 3607-3613).
(59) Further information on graph SLAM and its back end can be found in each of: G. Grisetti, R. Kummerle, C. Stachniss, and W. Burgard, “A tutorial on graph-based slam,” IEEE Intelligent Transportation Systems Magazine, vol. 2, no. 4, pp. 31-43, 2010; and S. Thrun, W. Burgard, and D. Fox, Probabilistic robotics. MIT press, 2005.
(60) In the next subsection, methods of applying spatial consistency checks to estimate whether a loop closure is correct or not are discussed.
(61) A. Detection and Selection of Consistent Loop Closures
(62) 1) Spatial Consistency Test for a Pair of Loop Closures:
(63) A spatial consistency test is applied to each pair of loop closures in the constructed graph.
(64) Consider as a first example, and referring to
(65) For example, starting at the initial point of trajectory T1, in any of the four sub-figures of
(66) The top two graphs 402, 452 in
(67) In particular, on the left hand side 400 of
(68) L3 fails the spatial consistency test when jointly tested with any other loop closure, so is a false positive and inconsistent with the true displacement of two places.
(69) The skilled person will appreciate that the top graph 402 is equivalent to the bottom graph 404 with a rotation and translation to set the initial position as the origin—the trajectories and loop closures match the ground truth.
(70) By contrast, on the right hand side 450 of
(71) The intuition is that the relative poses encapsulated in the loop closure pair should be consistent with the odometry information of the outbound and inbound trajectory segments (i.e. the portions of the trajectory between pose nodes of the loop closures). Here a segment, as will be understood by the person skilled in the art, is a section (i.e. segment) of a trajectory, such as for example each T1 and T2. Two loop closures and the trajectories between them form a closed chain, or circle in the graph, as shown in
(72) More specifically, inspiration is drawn from the statistics method in M. Mazuran, G. D. Tipaldi, L. Spinello, W. Burgard, and C. Stachniss, “A statistical measure for map consistency in slam,” in Robotics and Automation (ICRA), IEEE, 2014, pp. 3650-3655 to measure the consistency between two loop closures. For simplicity, the initial point of trajectory T1 is taken as a starting point with an initial pose vector and a zero covariance matrix. With the relative pose information provided by both odometry edges and loop closure edges, the probability distribution of final pose after traversing the circle can be calculated through dead reckoning. The relative pose and covariance matrix of the odometry edges in the inbound trajectory T2 and loop closure L1 are calculated in a reverse direction to form a unidirectional circle. Then, it can be assumed that the mean of the distribution of final pose should be close to the initial pose if these two loop closures are consistent with each other. This is because the error provided by odometry drift should be small when the distance travelled is short. Thus, a null hypothesis of a distribution where the mean is a zero vector (the same as initial pose) and the covariance is equal to the one of calculated final pose is provided. Eventually, a χ.sup.2 test is applied to check whether the final pose is accepted as the null hypothesis.
(73) As shown in
(74) Based on the pose nodes, odometry edges and loop closure edges, it is possible to calculate the probability distribution of a final pose matching with its initial pose.
(75) Let p.sub.0.sup.T.sup.(u.sub.1.sup.T.sup.
(u.sub.n.sub.
(l.sub.1, s.sub.1.sup.l) and
(l.sub.2, s.sub.2.sup.l,) respectively. Note that the above data are all available directly in the constructed pose graph. The relative poses and covariance matrices in the inbound trajectory segment T2 and loop closure L1 are reversed to form the unidirectional circle. Define the probability distribution p.sub.0 of the initial pose as:
p.sub.0˜(m.sub.0,S.sub.0),m.sub.0=(x.sub.0,y.sub.0,θ.sub.0).sup.T,S.sub.0=0 (1)
where 0 is a 3×3 zero matrix. Therefore, the distribution of the final pose p.sub.fin˜(m.sub.fin, S.sub.fin) can be derived with the following chain equations:
(76)
where m.sub.k and S.sub.k are the mean and covariance of the dead reckoning at time k, I.sub.k and V.sub.k are mean and covariance of the control variable at time k, and f(⋅) is device's motion model. p.sub.fin=p.sub.n.sub.
(77) This confidence is given by the parameter alpha of the chi-squared test. If a small alpha is set and the pair of loop closures still passes the chi-squared test, there is a high confidence that these two loop closures are spatially consistent with each other. A confidence score may be assigned to the pair of loop closures indicating that they are consistent; this may be termed a high confidence score within the method being used.
(78) A confidence scores for a single loop closure is calculated by performing multiple pairwise spatial consistency tests between that loop closure and other loop closures, as is discussed in more detail below.
(79) Measuring the spatial consistency on each pair of loop closures is undesirable since long trajectory segments suffer from large accumulative drifts on odometry, leading to an inaccurate result from a spatial consistency test. Another reason is that computational overhead grows quadratically with respect to the number of loop closures. Thus, in the embodiment being described a limitation is set on the maximum distance of two trajectory segments between loop closures.
(80) 2) Loop Closure Selection:
(81) When all spatial consistency tests are finished, each loop closure L may pass n.sub.p tests and fail in n.sub.f tests. It can be assumed that the ratio between n.sub.p and n.sub.p+n.sub.f which is named as pass rate should be similar to the true-positive rate (ratio between the number of true-positives and all the loop closures) in the graph. The intuition behind this assumption is that true-positives are more likely to be consistent with each other while a false-positive struggles to be consistent with any other loop closure. Since random outliers are the main focus in the initial graph 37, being the most common type of outliers generated by front-end systems 34, all loop closures, including true-positives and false-positives, tend to be evenly distributed in the graph 37 in some degree, especially when the number of loop closures is quite large. Therefore, the local ratio true-positive rate should be similar to the global true-positive rate. To filter out false positives, a threshold Theta based on the pass rate of each loop-closure is used; filtering out false positives may be thought of as rejecting loop closures that fall below a certain pass rate. This threshold may be fixed or it may be determined based on the pass rate values of existing loop closures by statistical methods, such as clustering (e.g. mixture of Gaussians or k-means). In the embodiment being described, k-means clustering is used.
(82) Thus, it can be seen that the pass rate of a loop closure may be thought of as determining a confidence (or validity) score for that loop closure. This may be thought of as a level of confidence in that loop closure. The skilled person will appreciate that other functions of n.sub.p and n.sub.f could be used to derive alternative metrics of confidence.
(83) Therefore, after the above loop closure detection and selection, a consistent subgraph 305 where, at least, the majority of the loop closures are true-positive is produced. It is worth noting that it is not necessary to eliminate all false-positives at this stage because in the subsequent reconstruction steps, artificial loop closures will be constructed and injected to further reinforce true-positive loop closures of this subgraph.
(84) B. Loop Closure Reconstruction
(85) This section explains how artificial loop closures are reconstructed and then introduced into a subgraph 305 previously generated with selected consistent loop closures. These artificial loop closures may be thought of as the generation of additional loop closures seeded from loop closures that have high confidence (or validity) scores (i.e. a good degree of confidence).
(86) 1) Searching Neighbour:
(87) Each consistent loop closure is first assigned with a consistent neighbour loop closure, which is discovered by a shortest path algorithm among loop closures. More specifically, in the embodiment being described, by starting at one node of the selected loop closure, a Dijkstra's shortest path algorithm is employed to find another loop closure that is on the shortest path between the two nodes of the selected loop closure and is spatially consistent with it. The search result is accepted if and only if a unique loop closure exists on this shortest path and the length of the shortest path is under a maximum distance threshold. Thus, a pair of loop closures in the graph is selected as a candidate to seed further loop closures between them.
(88) The reason for constructing artificial loop closures between a loop closure and its consistent neighbour rather than all consistent loop closures is that a spatial consistency test is generally more reliable when the distance traversed on the circle is shorter due to odometry drifts. As such, an advantage of constructing loop closures in this manner is that more robust artificial loop closures e.g. 311 are generated. A way of ensuring that artificial loop closures are inserted between two correct loop closures is to demand that both loop closures have high confidence (validity) scores, i.e. the confidence metric (e.g. pass rates) of both loop closures may exceed a more stringent threshold (Theta′) than the one used (Theta) to decide whether to keep or reject loop closures. This more stringent threshold can be set to a fixed value or determined based on the data via statistical methods, such as clustering (as the original threshold Theta). Theta and Theta′ may be thought of as first and second levels of confidence.
(89) 2) Calculating Relative Pose Between Trajectory Segments:
(90) For each loop closure that has a consistent neighbour, artificial loop closures 311 are constructed on the two trajectory segments between them. To this end, two kinds of information are used. One is connectivity indicating which two pose nodes should be connected by an artificial edge, which can be calculated to link the nodes. The other is a relative transformation between the two pose nodes and its covariance matrix. To calculate them correctly, it is useful to know the relative transformation between two trajectory segments.
(91) Since the relative transformation between the two trajectory segments can be defined by either the selected loop closure or its consistent neighbour loop closure, the one having passed more spatial consistency tests, which indicates a stronger consistency, is used. In the embodiment being described, if the two loop closures coincidentally have equal consistencies, one is randomly chosen. Then, one of the trajectory segments can be transformed to have a roughly correct relative pose with respect to another trajectory segment according to the relative transformation of the two poses of the chosen loop closure.
(92) 3) Establishing Connectivity of Potential Loop Closures:
(93) Once the relative transformation between two trajectory segments are known and one trajectory segment is rotated to have correct relative pose with respect to the other, the next step is to construct connectivity of artificial loop closures. Dynamic Time Warping (DTW) (see for example M. Müller, “Dynamic time warping,” Information retrieval for music and motion, pp. 69-84, 2007) is utilised to match poses of the two trajectories. Since DTW only allows associating trajectories traversed in the same direction, one trajectory segment would be reversed if the directions of two trajectory segments are different. All matches of poses between the two trajectory segments are the potential artificial loop closures, which, however, only contain connectivity without transformation and covariance information needed for a loop closure. The subsequent subsections focus on how to compute this information.
(94) 4) Formulating Model for Potential Artificial Loop Closures:
(95) To calculate relative transformation, including translation and rotation, and corresponding covariance of each potential artificial loop closure, a graphical model is formulated as shown in
(96) {circumflex over (L)}.sub.0, {circumflex over (L)}.sub.1, . . . , {circumflex over (L)}.sub.n are potential loop closures from the two trajectory segments T1 and T2. {circumflex over (L)}.sub.0 is directly regarded as the initial artificial loop closure {circumflex over (L)}.sub.0 and {circumflex over (L)}.sub.0 is modelled as the observation of the last artificial loop closure {circumflex over (L)}.sub.n.
(97) In the upper part 510 of
(98) 5) Calculating Relative Pose and Covariance:
(99) The distribution of all the artificial loop closures can be calculated by dead reckoning where each loop closure rather than a pose is taken as the state variable. The probability is propagated from the initial loop closure through an Extended Rauch-Tung-Striebel (ERTS) smoother and the propagated mean and variance are constrained by the observation of the last artificial loop closures to avoid divergence. Note that all the artificial loop closure mentioned above are still potential ones.
(100) Assume {circumflex over (L)}.sub.k˜(k=0, 1, 2, . . . , n) are potential artificial loop closures where {circumflex over (x)}.sub.k and Ŝ.sub.k.sup.l, are the state variable and covariance to be calculated, except for the initial one which is the same as the selected loop closure, i.e. {circumflex over (L)}.sub.0=L.sub.0˜
(l.sub.0, S.sub.0.sup.l), while L.sub.n˜
(l.sub.n, S.sub.n.sup.l), which actually is the consistent neighbour, is regarded as an observation of the last potential artificial loop closure {circumflex over (L)}.sub.n in the model. Note that all {circumflex over (x)}.sub.k, x.sub.0 and x.sub.n are vectors indicating relative poses in the loop closures while Ŝ.sub.k.sup.l, S.sub.0.sup.l and S.sub.n.sup.l are covariance matrices. Furthermore, the odometry edges of trajectory segments T.sub.1 and T.sub.2 between two potential artificial loop closures are represented by o.sub.i.sup.T.sup.
(u.sub.i.sup.T.sup.
(u.sub.j.sup.T.sup.
(101) Since a standard ERTS smoother as mentioned in S. Särkkä, “Bayesian filtering and smoothing”. Cambridge University Press, 2013, vol. 3 is applied in this embodiment, only the transition model and the observation model used in the smoother are addressed herein. The former solves the propagation from a potential artificial loop closure {circumflex over (L)}.sub.k-1 to the successor {circumflex over (L)}.sub.k with odometry edges o.sub.i.sup.T.sup.
(102)
where equation 3a is the transition from {circumflex over (L)}.sub.k-1 to {circumflex over (L)}.sub.k. Its nonlinearity is the reason why ERTS is chosen rather than RTS smoother. Matrix M is a rotation matrix and Δθ.sub.i.sup.T.sup.
(103) The above equations propagate distributions in the forward process when there is no observation of the potential artificial loop closure. For the last loop closure L.sub.n which has an observation L.sub.n, the following observation model is used to execute an update step.
ŷ.sub.n=H{circumflex over (X)}.sub.n+r.sub.n,r.sub.n˜(0,S.sub.n.sup.l) (4)
where matrix H is a 3×3 identity matrix, it sums up the mean value of the last potential artificial loop closure {circumflex over (L)}.sub.n with a zero-mean Gaussian noise whose covariance function is the same as the one of its neighbour, the consistent neighbour loop closure L.sub.n. Due to the linearity, the calculation of partial derivation is avoided for the observation model.
(104) 6) Choosing Potential Loop Closures to Inject:
(105) Among all potential artificial loop closures, only a fixed percentage of them (e.g. 10%) that have the smallest uncertainties are injected into the graph 305 in the embodiment being described, producing an augmented pose graph 307 for back-ends 38. In other embodiments an amount other than 10% may be injected. For example roughly any of the following may be injected: 5%; 15% 20%, 25%.
(106) III. Experimental Results
(107) The embodiment being described was implemented in Matlab and tested on eight public datasets.
(108) In terms of competing approaches, RRR [8] is considered as another middle layer, and back-ends (DCS [3], SC [1] and Cauchy robust kernel—[19] P. Agarwal, “Robust graph-based localization and mapping,” PhD thesis, University of Freiburg, Germany, 2015), and open-source implementations are used. It is worth noting that further extensive experimental results can be found in a supplementary file at: https://github.com/xie9187/IROS2017-Supplementary-results.
(109) A. Datasets
(110) To fairly assess the approach disclosed herein and compare it with other approaches, eight different public datasets were used for experiments. Bicocca, Bovisa04 and Bovisa06 datasets are from reference [8]. Manhattan3500Olson (M3500Olson), ringCity, city10000 and intel datasets are available in the open source package of vertigo [2] (https://openslam.org/vertigo). MIT-Killian-Court (MIT) dataset is also open source (http://www.lucacarlone.com/index.php/resources/datasets).
(111) The databases used are listed in Table I.
(112) TABLE-US-00001 TABLE I Public datasets used in experiments Original Max additional Dataset Poses loops outliers Bicocca 43116 767 1534 Bovisa04 11393 197 394 Bovisa06 10744 219 483 city10000 10000 10688 21376 M3500Olson 3500 2099 4198 ringCity 2361 901 1802 Intel 943 895 1790 MIT 808 20 40
(113) In each dataset, varying numbers of additional outliers are randomly generated according to the number of original loop closures in the graph (25%, 50%, 100%, 200%). Thus for each dataset, four extra datasets are created with additional outliers. The relative pose in each outlier is sampled from a uniform distribution in Special Euclidean Group SE(2) while the information matrix is set to the average value of information matrices of original loop closures in a graph.
(114) B. With and Without Middle Layer 310
(115) In this section, the enhanced robustness of the whole system 300 when the embodiment being described is employed as a middle layer 310 between the front- 34 and back-ends 38 is validated.
(116) Three robust back-end algorithms, Cauchy robust kernel (Cauchy) [19], DCS [3] and SC [1], implemented in g2o and vertigo are adopted to use in conjunction with the proposed middle layer 310. The performance of these back-ends 38 is compared when they are combined with/without the middle layer 310 on all datasets with a growing number of outliers. Although experiments have been performed on all datasets with several numbers of outliers, only results from M3500Olson, ringCity and MIT datasets with 50%, 100% and 200% outliers are illustrated in Table II and
(117) TABLE-US-00002 TABLE II Results of different back-ends combined with/without RRR or GTk on 4 datasets Dataset ringCity M3500Olsen MIT-Killian-Court Intel Back-end Cauchy DCS SC Cauchy DCS SC Cauchy DCS SC Cauchy DCS SC Outliers Middle-end RMSE (m) 50% None 15.79 0.78 1.39 23.90 5.84 0.32 12.66 155.63 59.90 0.05 0.07 0.13 RRR 26.76 19.74 15.85 23.65 12.52 12.60 135.65 157.54 122.57 0.10 0.10 3.28 GTk 1.05 0.59 1.41 1.05 0.59 1.41 1.91 156.29 2.00 0.06 0.07 0.10 100% None 34.84 4.75 10.26 24.40 6.91 0.12 16.86 155.40 118.59 0.06 0.07 0.10 RRR 42.67 19.33 18.15 29.47 5.21 5.44 11.25 156.05 34.63 0.10 0.10 0.17 GTk 3.53 0.80 1.00 24.75 0.44 0.34 1.54 154.13 8.55 0.06 0.06 0.09 200% None 67.36 13.06 36.04 25.36 7.52 0.04 55.43 155.92 150.55 0.10 0.07 0.09 RRR 31.41 25.74 26.16 12.92 14.37 13.65 44.23 155.27 35.61 0.10 0.10 8.30 GTk 13.59 2.65 4.44 23.99 5.72 0.28 37.55 157.34 68.30 0.09 0.10 0.10
(118) As shown in Table II, which lists root-mean-square errors (RMSE) for optimised pose graphs, the embodiment being described (GTk) is capable of improving, perhaps significantly, the robustness of the three robust back-ends. Although there are few cases in which the RMSE increases slightly when the embodiment being described (GTk) is applied, improvements in the robustness of the whole system 300 are generally seen, enabling back-ends 38 to converge to correct results. Moreover, RRR, applied as another middle layer, is also mentioned in this table and will be discussed more in the next subsection.
(119) Table II-A, below, shows equivalent data for a slightly different embodiment of GTk,
(120) TABLE-US-00003 TABLE II-A Results of different back-ends combined no middle layer, Outlier Rejection (OR) only or GTk (outlier rejection and inlier insertion) on 4 datasets Dataset ringCity M3500Olsen Intel MIT-Killian-Court Back-end Cauchy DCS SC Cauchy DCS SC Cauchy DCS SC Cauchy DCS SC Outliers Middle-end RMSE (m) 50% None 10.88 0.72 0.66 23.87 9.11 0.27 0.04 0.06 0.12 12.61 16.37 13.71 OR 0.95 0.48 1.12 1.98 0.23 0.37 0.05 0.06 0.06 1.87 9.78 1.84 GTk 0.68 0.83 1.12 0.19 0.09 0.09 0.07 0.06 0.06 1.90 2.28 2.09 100% None 31.03 4.78 5.23 24.60 8.15 0.01 0.05 0.06 0.08 16.87 52.51 19.99 OR 2.25 0.66 0.70 16.87 0.12 0.13 0.05 0.06 0.06 2.32 13.61 8.25 GTk 1.82 0.68 0.63 6.68 0.07 0.08 0.07 0.06 0.06 1.27 10.61 8.25 200% None 51.63 13.42 23.42 25.43 8.03 0.02 0.09 0.06 0.20 53.18 58.22 127.14 OR 3.74 0.64 22.21 23.48 2.75 0.25 0.06 0.06 0.06 36.22 72.46 64.14 GTk 1.44 1.08 0.91 16.35 0.20 0.20 0.07 0.06 0.06 36.25 26.04 64.11
compared to no middle-layer and an outlier-removal only middle layer:
(121) Table II-A again shoes the root-mean-square error (RMSE) of optimised pose graphs. It can be seen that, when using the proposed outlier rejection (OR) algorithm alone, the system becomes more robust to false positive loop closures than systems without a middle layer. The Table shows that, when this embodiment of GTk is applied, the robustness of the system is further enhanced, generally increasing accuracy. Although there are few cases in which the error increases slightly when this embodiment is applied, improvements in the robustness of the whole system are generally seen, facilitating back-ends converging to correct results.
(122) Further analysis of these experiments indicated that the optimisation result is improved by the outlier rejection (OR) algorithm because it effectively removes most of the false-positive loop closures. However, since a number of true-positives are also rejected, the graph loses some essential constraints, and does not converge globally to the ground-truth. By contrast, when an embodiment including the further step of the GTk embodiment being described of inserting artificial loop closures is applied, these discarded constraints are artificially constructed by the inlier injection algorithm, which enables the back-end to converge to an accurate reconstruction. In general, it can be seen that the combination of outlier rejection and inlier insertion together can make existing SLAM approaches more robust, without extensive parameter tuning.
(123) For the MIT-Killian-Court dataset, the benefit of incorporating the embodiment being described (GTk) only comes when used with Cauchy and SC because DCS fails even when there are no additional outliers where the parameter Φ is tuned from 0.1 to 10. Thus, the embodiment being described (GTk) cannot improve the DCS back-end on this dataset. While for the Intel Research dataset, since its initialisation of pose nodes is already close to ground truth, it is easy for all approaches to reach a satisfactory result after optimisation with any number of outliers.
(124) In ringCity and M3500Olson datasets, dramatic improvements are achieved by the embodiment being described (GTk), RMSE is reduced by several times, except for applying SC on M3500Olson dataset which does not fail with any number of outliers.
(125)
(126) The solid line 602a-f shows the ground truth. The dotted line 604a-f shows the calculation using the combination of GTk/no-GTk with a back end.
(127)
(128)
(129)
(130)
(131)
(132)
(133) For more results, please refer to the supplementary file referenced above.
(134) The skilled person will appreciate that, whilst the datasets shown relate to x-y coordinates of a global map, the approach discussed herein can be used in any context in which loop closures exist whether or not there is a global map. For example, it may be used in Experience-Based Navigation type situations, as discussed in WO2013117940, “METHOD OF LOCATING A SENSOR AND RELATED APPARATUS”.
(135) C. Comparison with RRR
(136) For existing robust graph SLAM algorithms and back-ends 38, RRR is the most similar to the embodiment being described with open-source resources. Therefore, it is chosen as a comparison.
(137)
(138)
(139)
(140) The combinations of RRR and the middle layer 310 with DCS and SC back-ends 38 were tested with all datasets.
(141) Some of the results are shown in Table II (above),
(142)
(143)
(144) Red and blue boxes (first two, i.e. leftmost two, in each cluster) represent results from RRR while green and orange boxes (last two, i.e. rightmost two, in each cluster) are for a middle layer 310 of the embodiment being described.
(145) In each set of box-plots in each graph 700a-c, the box plot for RRR-DCS is left-most, adjacent to the box plot for RRR-SC. The box plot for the middle layer 310-SC is right-most, adjacent to the box plot for the middle layer 310-DCS.
(146) In
(147) In all these cases, the middle layer 310 outperforms RRR, especially on the M3500Olson (
(148) For more detailed results and comparison with RRR, please refer to the supplementary file referenced above.
(149)
(150) The solid lines 802a-e are the ground truth. The dotted lines 804a-f are the model.
(151)
(152)
(153)
(154) In each pair, the ground truth line 802 is the same.
(155) D. Runtime Analysis
(156) Although the middle layer 310 was implemented with Matlab rather than C or C++ in the embodiment being described, the runtime was found to be reasonable. The skilled person would appreciate that the middle layer 310, or other implementation, may be implemented in any appropriate language.
(157) The detailed runtime of middle layer 310 on the eight datasets is given in Table III.
(158) TABLE-US-00004 TABLE III Runtime of GTk on 8 datasets Number of Running Dataset loop closures time (s) Bicocca 767 14.18 Bovisa04 197 3.22 Bovisa06 219 7.34 city10000 10688 809.69 M3500Olson 2099 315.06 ringCity 901 88.18 Intel 895 311.39 MIT 20 0.25
(159) The most time consuming part in the embodiment being described was found to be executing abundant spatial consistency tests while looking for a consistent subset of loop closures in the graph.
(160) The quadratic time increase with respect to the number of loop closures is avoided in this embodiment by restricting the traversing distance of the circle in the test with a threshold which largely reduces the number of loop closures to be compared. Hence, this threshold determines runtime to some extent. However, an extremely small threshold will prevent the selected loop closure from being compared with enough other loop closures. Hence, the default value is set to 300 steps in the embodiment being described to achieve a suitable balance between runtime and performance. In the embodiment being described, each step is an actual step taken by a person carrying the device; one step corresponds to one odometry edge in this embodiment. In alternative embodiments, a “step” may correspond to a set number of steps or wheel rotations, a set distance, a set time of travel, a time between pauses, or the like.
(161)
(162) Step 1010, artificial loop closure insertion, is performed in embodiments implementing the “GTk” approach discussed above in addition to the Outlier Removal (OR) approach common to all embodiments, but not in all embodiments. The output from step 1010 is the augmented graph 307 shown in
(163)
(164) From the above, the skilled person will appreciate that embodiments/aspects of the invention may be thought of as providing one or more of the following: A spatial consistency testing algorithm to measure the consistency between a pair of loop closures (for example between a first and subsequent loop closures) and select a subset of consistent ones, removing false positive loop closures even if they form an overwhelming majority of identified loop closures; An approach is developed to boost the robustness of pose graph SLAM by automatically reconstructing and injecting trustworthy artificial loop closures in the framework of an Extended Rauch-Tung-Striebel smoother; A universal middle layer, named Graph-Tinker (GTk), is constructed from the above two approaches, which may be used in conjunction with any front-end and back-end systems to improve their performance.
(165) Uses of embodiments described herein could include, but are not limited to, any of the following examples: (i) allowing a device to localise itself with respect to trajectories of other devices; for example a firefighter with a smart device (e.g. smartphone, smart watch, part of a firefighter's standard kit, or the like) arranged to implement an embodiment of the invention can localise him or herself, on entering a building, relative to the trajectories of other firefighters that have already walked inside the building; (ii) creating maps of traffic or foot-fall, for example for use in retail surveys to establish where customers walk and look; (iii) creating maps of environments through which devices have travelled.
(166) The skilled person will appreciate that the embodiments disclosed herein could be used for SLAM of one device's trajectories, or of trajectories of multiple devices. Further, trajectories used by a single embodiment may be a mixture of trajectories generated by different types of devices, such as some being generated by robots, some by other mobile objects and some by people.