Professional Documents
Culture Documents
BS-SLAM: Shaping The World
BS-SLAM: Shaping The World
BS-SLAM: Shaping The World
Luis Pedraza∗, Gamini Dissanayake†, Jaime Valls Miro† , Diego Rodriguez-Losada∗, and Fernando Matia∗
∗ Universidad
Politecnica de Madrid (UPM)
C/ Jose Gutierrez Abascal, 2. 28006, Madrid, Spain
Email: luis.pedraza@ieee.org
† Mechatronics and Intelligent Systems Group. University of Technology Sydney (UTS)
NSW2007, Australia
Abstract— This paper presents BS-SLAM, a simultaneous has been successful in many indoor environments, presence of
localization and mapping algorithm for use in unstructured curved elements can create significant problems. In particular,
environments that is effective regardless of whether features attempting to interpret information from a sensor using an
correspond to simple geometric primitives such as lines or not.
The coordinates of the control points defining a set of B-splines incorrect model is one of the major causes of failure of many
are used to form a complete and compact description of the estimation algorithms. Some efforts have been made in the
environment, thus making it feasible to use an extended Kalman past when circle features are available [20], but that’s still
filter based SLAM algorithm. The proposed method is the first a big simplification. Thus a more generic representation of
known EKF-SLAM implementation capable of describing both the environment can potentially improve the robustness of the
straight and curve features in a parametric way. Appropriate
observation equation that allows the exploitation of virtually SLAM implementations.
all observations from a range sensor such as the ubiquitous Alternative to using a specific environmental model is to
laser range finder is developed. Efficient strategies for computing use information from sensor observations from different robot
the relevant Jacobians, perform data association, initialization poses to obtain an accurate relationship between these poses.
and expanding the map are presented. The effectiveness of the While this strategy has been successfully used to generate
algorithms is demonstrated using experimental data.
accurate visualizations of complex structures [7] and detailed
maps of indoor environments [8], it can not exploit the inherent
I. I NTRODUCTION
information gain that occur in traditional SLAM due to the
Developing an appropriate parameterization to represent the improvement of map quality.
map is the key challenge for simultaneous localization and In this paper, it is proposed to use B-splines to represent
mapping in unstructured environments. While a substantial the boundary between occupied and unoccupied regions of
body of literature exists in methods for representing unstruc- a complex environment. B-splines provide naturally compact
tured environments during robot mapping, most of these are descriptions consisting of both lines and curves. Vertices of
unsuitable for use with the Kalman filter based simultaneous the control polygons that describe a set of B-splines are
localization and mapping. For example, the use of popular oc- used to represent a complex environment by a state vector.
cupancy grid approach [13], based on dividing the environment Computationally efficient strategies for (a) initializing and
into small cells and classify these as occupied or unoccupied, extending the state vector when new parts of the environment
and its variants such as those using quad-trees would result in are discovered, (b) formulating a suitable observation equation
an impractically large state vector. that allows the exploitation of virtually all the information
In much of the early SLAM work the map is described gathered from a laser range finder, and (c) evaluation of
by a set of points [6], [9], [11]. While this simplifies the appropriate Jacobians for easy implementation of Kalman filter
formulation and the complexity of the SLAM estimator, there equations are presented in detail. The algorithms proposed
are two main disadvantages in relying solely on point features. are evaluated for effectiveness using data gathered from real
The obvious problem arises if the environment does not have environments.
sufficient structure to be able to robustly extract point features, The paper is organized as follows. Section II introduces
for example in an underground mine [12]. The more significant some general concepts and properties of B-spline curves.
issue is the fact that much of the information acquired from a Section III shows how these powerful tools fit into the EKF-
typical sensor, such as a laser range finder, does not correspond SLAM framework. Finally, some experimental results and
to point features in the environment. Therefore, the raw infor- conclusions are presented in sections IV and V.
mation from the sensor needs to be analysed and observations
corresponding to stable point features extracted. During this II. S PLINES F UNDAMENTALS
process, typically more than 95% of the observations are In this section, a brief introduction to the fundamental
discarded and the information contained in these observations concepts of the B-splines theory is presented. The term spline
wasted. One strategy to exploit this additional information is to is used to refer to a wide class of functions that are used
model the environment using alternative geometric primitives in applications requiring interpolation or smoothing of data
such as line segments [3], [15] or polylines [18]. While this in a flexible and computationally efficient way. A spline of
degree k (order k − 1) is a piecewise polynomial curve; i.e. a 4) As a consequence of property 3, the value of s (t) at a
curve divided into several pieces, where each of these pieces is site ξj ≤ t ≤ ξj+1 for some j ∈ {k − 1, . . . , n} depends
described by a polynomial of degree k, and the different pieces only on k of the coefficients:
accomplish with certain continuity properties at the joint points j
X
or knots. Their most common representation is based on the s (t) = xi βi,k (t) (5)
utilization of B-splines (where B stands for basic). i=j−k+1
A. B-Splines Definition 5) The sum of all the B-spline basis functions for any value
Letting s (t) be the position vector along the curve as a func- of the parameter t is 1:
tion of the parameter t, a spline curve of order k, with control n
X
points xi (i = 0 . . . n) and knot vector Ξ = {ξ0 , . . . , ξn+k } βi,k (t) = 1 (6)
can be expressed as: i=0
n
X 6) The derivative of a B-spline of order k is a spline of
s (t) = xi βi,k (t) (1) one order k − 1, whose coefficients can be obtained
i=0 differencing the original ones [4].
where βi,k (t) are the normalized B-spline basis functions n
ds (t) 0
X xi − xi−1
of order k which are defined by the Cox-de Boor recursion = s (t) = (k − 1) βi,k−1 (t) (7)
dt ξ
i=0 i+k−1
− ξi
formulas [16], [4]:
For further information and justification of the previous
1 if ξi ≤ t ≤ ξi+1
βi,1 (t) = (2) properties, please see [4], [14], [1] and [16].
0 otherwise
and C. Curve Fitting
(t−ξi ) (ξi+k −t) Here we consider the problem of obtaining a spline curve
βi,k (t) = βi,k−1 (t)+ βi+1,k−1 (t) (3) that fits a set of data points dj , j = 0 . . . m. If a data point
ξi+k−1 −ξi ξi+k −ξi+1
lies on the B-spline curve, then it must satisfy equation 1:
The knot vector is any nondecreasing sequence of real
numbers (ξi ≤ ξi+1 for i = 0, . . . , n+k−1) and can be defined dj = β0,k (tj ) x0 + . . . + βn,k (tj ) xn , j = 0...m
in two different ways: clamped, when the multiplicity of the
system of equations which can be more compactly written as
extreme knot values is equal to the order k of the B-spline, T
and unclamped [16, 14]. When clamped knot vectors are used, d =
d0 d1 . . . dm
T
first and last control polygon points define the beginning and
x = x0 x1 . . . xn
end of the spline curve. d = Bx β0,k (t0 ) . . . βn,k (t0 ) (8)
.
.. . .. .
..
B =
4 4
3.5 3.5
x1 x2 x1 x2
3
2.5 ξ4 x3
3
2.5
x0 ξ3 ξ4 x3
β0,k (tm ) . . . βn,k (tm )
x0
2
ξ 2
ξ5
1.5
ξ0 = ξ1 = ξ2 = ξ3 x5
5
1.5 ξ2
x5 ξ6 Matrix B, usually referred to as the collocation matrix, has
1 1
0.5
x4
0.5
ξ1
ξ4 ξ7
x4
for each of its rows at most k non-null values. The parameter
0 0 ξ0
−0.5
ξ6 = ξ7 = ξ8 = ξ9
−0.5
ξ9
ξ8
value tj defines the position of each data point dj along the
−1
−1 0 1 2 3 4 5 6 7 8
−1
−1 0 1 2 3 4 5 6 7 8
B-spline curve, and can be approximated by the chord length
between data points:
Fig. 1. Examples of splines in B-spline form. a) Cubic spline with clamped
knot vector (Ξc : ξ0 = . . . = ξ3 ≤ . . . ≤ ξ6 = . . . = ξ9 ). b) Cubic spline
t0 = 0
with unclamped knot vector (Ξc : ξ0 ≤ . . . ≤ ξ9 ). Pj (9)
tj = s=1 |ds − ds−1 | , j≥1
being the total length of the curve
B. Properties of Spline Curves
m
X
In this section, some properties of spline curves, defined as `= |ds − ds−1 | (10)
linear combination of B-splines, are summarized. s=1
1) The curve generally follows the shape of the control which is taken as the maximum value of the knot vector.
polygon. The most general case occurs when 2 ≤ k ≤ n+1 < m+1;
2) Any affine transformation is applied to the curve by the problem is over specified and can only be solved in a mean
applying it to the control polygon vertices. sense. A least squares solution can be computed making use
3) Each basis function βi,k (t) is a piecewise polynomial of the pseudoinverse matrix of B:
of order k with breaks ξi , . . . , ξi+k , vanishes outside the −1 T
interval [ξi , ξi+k ) and is positive on the interior of that x = BT B B d = Φd (11)
interval:
Once the order of the B-spline bases k is predefined, the
βi,k (t) > 0 ⇔ ξi ≤ t < ξi+k (4) number of control polygon vertices n + 1, and the parameter
values along the curve are known (as calculated from equation 2) Splines Association: In this section, the data association
9), the basis functions βi,k (tj ) and hence the matrix B can process is described. At each sampling time, k, a new set of
be obtained. splines is obtained, being necessary to achieve a good feature
In the work here presented, clamped knot vectors are gen- association between the curves that are already contained in
erated taking the total length of the curve ` (equation 10), and the map (sm,1 , . . . , sm,N ), and the new ones that have just
defining a knot density which depends on the complexity of the been detected (so,1 , . . . , so,N2 ).
environment. Recall that knots are the joints of the polynomial The process is explained with an example. Take the situation
pieces a spline is composed of, so complex environments displayed in figure 3. Figure 3.a shows the initial configu-
need a high knot density, while segments can be described ration: a map containing one spline sm,1 (t), and two new
properly using longer polynomial pieces (lower knot density). features which have just been detected, so,1 (u) and so,2 (v)
The interested reader is referred to [5] and [2], where more (notice the lack of correspondence between the parameters of
information about curve fitting methods can be found. different curves). A rough measure of the distances between
the splines can be obtained by measuring the distances be-
III. SLAM WITH B-S PLINES tween the control points of each spline (recall here property
1). In order to improve this search, the map can be simplified
A. Data Management choosing only the splines that are close to the robot’s position.
A commonly used sensor in mobile robotics is the laser At each sampling time, the position of the observed splines
range-finder. Whenever a robots makes an observation of its is calculated taking into account the best available estimation
environment with such a device, a set of m data points di ∈ <2 for the robot’s position and orientation. Then, the distances
is obtained (we’re considering here the 2D scenario). In this from the control points of each of the detected splines to
section, methods for extracting parametric splines representing the control points of the splines contained in the map are
the physical detected objects are presented. It is also shown the calculated, and each of the observed splines is matched to
way of performing data association, establishing comparisons the closest one on the map, following this criterion:
between the detected splines and the map splines.
1) Obtaining Splines: When a new data set is obtained from i = 1 . . . nm
min (dist (xm,i , xo,j )) ≤ dmin , (12)
an observation of the environment, splines are extracted in a j = 1 . . . no
three-stages process (see Fig. 2): where xm,i are the control points of the map spline, xo,j
• Primary segmentation: Data stream is split into pieces are the control points of the observed spline, nm and no are,
separated by measurements out of range, if any. A set of respectively, the number of control points of the spline in the
N1 data vectors is obtained, called primary segmentation map and the detected spline, and dist (xm,i , xo,j ) represents
objects, and denoted F1,1 , F1,2 , . . . , F1,N1 (see Fig. 2.c). the euclidean distance between two control points.
• Secondary segmentation: An analysis of the relative
positions of consecutive data points is performed. The a) b) e
so,2(v) b
aim is to detect points close enough as to belong to the
sm,1(t) d
same feature, and also detect corners, but allowing points
so,1(u) c a
not to lie on the same segment (Fig. 2.f). A set of N2
secondary segmentation features is obtained (Fig. 2.d). Fig. 3. Data association process. Comparison of control points positions (a)
• Fitting: Each of the secondary segmentation objects is and parameters correspondence (b).
fitted by a cubic spline, as described in section II-C.
If no spline in the map is close enough to a detected spline
(as occurs with so,2 in figure 3.a) then, this new object is added
a) b) c)
F1,2 to the map once its position has been updated. If a spline is
associated with a map feature, then it is necessary to obtain
F1,1 a matching between their points, as depicted in figure 3.b.
This matching provides information about the correspondence
d) e) f) between the parameterizations of both curves, and is very
F2,4
F2,6 F2,7 d i+1
F2,5 αi useful when a spline extension is required. The process is as
F2,3 p p
F2,2
F2,8 i di i+1
follows:
F2,9 d i-1 • One of the extreme points of the observed spline is
F2,1
considered (point a)
Fig. 2. Splines detection steps: a) Robot and environment. b) A new data set • The closest point [19] on the map spline to the point a
is acquired. c) Primary segmentation. d) Secondary segmentation. e) Obtained
splines, fitting each of the data sets in d). f) Data points relative position. is calculated (point b)
|αi | ≤ αmax and max(|pi | , |pi+1 |) ≤ η · min(|pi | , |pi+1 |) are checked • If b is one of the extreme points of the map’s spline, then,
(typically αmax ∈ [0, π/4] and η ∈ [1.5, 2]). the closest point to b on the observed spline is calculated
(point c). Else, point a is matched with point b.
• The process is repeated taking as starting point the other C. The Observation Model
extreme of the observed spline (point d in the picture), The implementation of a EKF-SLAM algorithm requires
which is associated with the point e on the map spline. of an observation model; i.e. some expression which allows
At the end of this process, not only correspondent pairs of to predict the measurements that are likely to be obtained
points (c, b) and (d, e) are obtained, but also a correspon- by the robot sensors given the robot pose and the current
dence between the map spline parameter t and the observed knowledge of the environment. This measurement model can
spline parameter u: (uini , tini ) and (uf in , tf in ), given that be understood, in our particular case, as the calculation of the
intersection of the straight line defined by a laser beam (for
c = so,1 (uini ) b = sm,1 (tini ) each position across the laser angular range) with the splines
(13)
d = so,1 (uf in ) e = sm,1 (tf in ) contained in the map (Fig. 4). Unfortunately, calculating the
The simple data association process described in this sec- intersection of a straight line with a parametric curve, in the
T
tion, though quite simple and based upon euclidean distance form s (t) = [sx (t) , sy (t)] is not suitable for an explicit
metric, has performed very robustly in our experiments. How- mathematical formulation. There is a whole field of research
ever, benefits of parametric representation are not yet fully regarding this complex problem known as ray tracing [17].
exploited, and further research is being undertaken in this
sense. ^z η
rotation and translation
laser
z of control points
B. The State Model s(x i,t) uL uR
bea
vR vL s(x i,t)
The state of the system is composed by the robot (the only τ µ
m
vW s(x i,t) φR
mobile element) and all the map features, modeled in the uL
vL
work here presented by cubic splines. When these splines are
x R= (xR, yR , φR)
expressed as linear combination of B-splines, the state of each uW
sx(x i,t)
of them can be represented by the positions of their control
polygon vertices, given a fixed and known knot vector which Fig. 4. Observation model
generates a basis of B-splines for each of the map features.
Referring all the positions and orientations to a global In this document, the predicted measurement is calculated
reference system {uW , vW }, and assuming the robot as the in an iterative way, making use of property 2 in section II-
first feature in the map (F0 ) the following expressions describe B and the Newton-Raphson method for calculating the zeros
the state of the system at a certain time k: of a function. The first step is to define an orthonormal
T
reference system {uL , vL }, centered in the robot reference
xF0 = xr = [xr , yr , φr ] (14) system {uR , vR } and with the abscissas axis uL defined
T
xFi = xsi = [xi,0 , . . . , xi,ni , yi,0 , . . . , yi,ni ] (15) by the laser beam direction and orientation (see Fig. 4).
i = 1, . . . , N Let s̄ (x̄i (xi , xr ) , t) be the position vector along a spline
curve expressed in such a reference system (we’re making
and finally here explicit the functional dependency between a spline and
T its control points). The relationship between control points
x = xTr , xTs1 , . . . , xTsN (16) T T
xi = [xi , yi ] and x̄i = [x̄i , ȳi ] , i = 0 . . . n, is given by:
In the previous equations, N is the number of map static
x̄i cosµ sinµ xi − xr
elements (map features) and ni is the number of control points = (20)
ȳi −sinµ cosµ yi − yr
for each of them. Note that the number of control points for
each of the splines contained in the map can be variable, being µ the angle of the considered laser beam in the global
as features are progressively extended as new areas of the reference system; i.e. given the laser orientation in the robot
environment are explored. reference system, τ :
xj,nj yj,nj