Professional Documents
Culture Documents
Rheinische Friedrich-Wilhelms-Universita
r Informatik I
Institut fu
Philipp Serafin
Seminar report:
Continuous
configuration spaces
March 31, 2012
Abstract
This seminar report describes a mathematical tool set with which
planning problems can be solved even if the surrounding world cannot be dissected into countably many discrete states.
The particular focus will be on motion planning problems, such as
moving a particularly shaped robot through an environment or changing the configuration of a robot arm that can only be moved in a limited
number of ways.
The report is based on chapter 4, The configuration space of the
book Planning Algorithms by Stephen LaValle [LaValle, 2006].
Contents
1 Motivational example: Piano movers problem
1.1 Discrete formulation . . . . . . . . . . . . . . . . . . . . . . .
1.2 Goal for continuous formulation . . . . . . . . . . . . . . . . .
3
3
3
2 Road map
4
4
4
4 Mathematical concepts
4.1 Topological spaces . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Boundary points . . . . . . . . . . . . . . . . . . . . . . . . .
4.2.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3 Connected sets . . . . . . . . . . . . . . . . . . . . . . . . . .
4.3.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . .
4.4 Continuous functions . . . . . . . . . . . . . . . . . . . . . . .
4.4.1 Continuous functions and connected sets . . . . . . . .
4.5 Homeomorphisms . . . . . . . . . . . . . . . . . . . . . . . . .
4.5.1 Existence of homeomorphisms as equivalence relation
4.5.2 Examples of homeomorphisms: . . . . . . . . . . . . .
4.6 Methods of deriving topological spaces . . . . . . . . . . . . .
4.6.1 Subspace topology . . . . . . . . . . . . . . . . . . . .
4.6.2 Product topology . . . . . . . . . . . . . . . . . . . . .
4.6.3 Identification . . . . . . . . . . . . . . . . . . . . . . .
4.7 Manifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
5
6
6
6
7
7
7
8
8
8
9
9
10
10
10
5 Configuration spaces
5.1 2D rotation . . . . . . . .
5.2 3D rotation . . . . . . . .
5.3 Translation and Rotation
5.4 Chains of bodies . . . . .
11
11
12
13
13
.
.
.
.
.
.
.
.
1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6 Obstacles
6.1 General definition . . . . . . . . . . . . . . . .
6.2 2D Translation . . . . . . . . . . . . . . . . .
6.2.1 Minkowski Sum and convex polygons .
6.2.2 Trivial algorithm for Minkowski sum .
6.2.3 Star Algorithm . . . . . . . . . . . . .
6.2.4 Correctness of Star Algorithm . . . . .
6.2.5 Run time of Star Algorithm . . . . . .
6.3 2D Translation and Rotation . . . . . . . . .
6.4 3D Translation . . . . . . . . . . . . . . . . .
6.5 Generalization to nonconvex polyhedra . . . .
7 Paths
7.0.1
.
.
.
.
.
.
.
.
.
.
13
14
14
14
15
15
16
19
19
20
20
Path-connected . . . . . . . . . . . . . . . . . . . . . .
20
21
8 Conclusion
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
21
1.1
Discrete formulation
1.2
Road map
We will first show how a non-discrete agent and world can be modeled using
geometric primitives. Then we will introduce the basic mathematical concepts to define states. Next, we will show how agents and obstacles modeled
geometrically in a world space can be represented in a continuous state
space. Finally we will show how paths between states can be represented.
3.1
Semi-algebraic primitives
A way to concisely and efficiently model geometric regions in Rn are semialgebraic primitives.
For a given polynomial function f : Rn R, let a primitive H := {x
Rn : f (x) 0}.
If f is linear, then the primitive describes a half-plane in R2 or half-space
in R3 :
Consider f (x, y) := ax + by + c. a, b and c define a line in R2 . Since
f (x, y) = 0 exactly for all points that lie on that line and f (x, y) < 0 exactly
for all points that are on one side of the line, the primitive defines a halfplane.
The intersection of k such sufficiently oriented half-planes yields an lsided convex polygon, where l k. Unions of such convex polygons can
yield non-convex polygons.
In both 2D and 3D cases, polynomials of higher order can be used for f
to yield shapes other than polygons and polyhedrons.
3.2
cos sin xt
R(, xt , yt ) := sin cos yt
0
0
1
2
To apply
the transformation, each point of (x, y) R is represented by
x
a vector y .
1
In R3 , rotations around all three axes are possible. Therefore the corresponding transformation has six parameters.
In addition to rigid models, agents may also be modeled as chains or trees
of links that are connected to their predecessor via joints. Then the state
of the agent is represented as a transformation for each joint that maps the
coordinate system of the next link to the coordinates of the previous link.
This is called a kinematic chain.
Mathematical concepts
To use the above definitions, the state space must have a corresponding state
for each possible homogeneous transformation. However the state space
should also reflect that, e.g. to change from one orientation to another, the
agent must assume all orientations in between - the path through the state
space must be continuous.
However, even if the state space would only represent orientation, it
could not be a single interval, since the path would wrap around when
the agent performs a full turn. Therefore the state space will be modeled as
a manifold and use a more general definition of continuity.
4.1
Topological spaces
4.2
Boundary points
Example
Consider R as a topological space with the open sets defined as all open
intervals (a; a+) for all a R, > 0 and all unions and finite intersections
of them. (This is called standard topology of Rn .)
Consider the intervals (0; 1) and [0; 1]. x1 = 0.5 is an interior point of
both of them as the open set (0; 1) contains x1 and also lies completely in
[0; 1].
x2 = 2 is an exterior point of both sets as it is contained in the open set
(1.5; 2.5) that lies completely outside of both (0; 1) and [0; 1].
Finding any open set like this is not possible for x3 = 1. Regardless
of how small an open interval around x3 would be chosen, parts of the
interval would always lie inside of (0; 1), respectively [0; 1] and parts would
lie outside. Therefore x3 is a boundary point of (0; 1) and [0; 1], even though
it is contained in [0; 1] and not contained in (0; 1).
4.3
Connected sets
4.3.1
Example
If one cuts the interval [0; 1] into two sub-intervals at a point a, the result
are two sets of the form [0; a), [a; 1] or [0; a], (a; 1]. As seen in the previous
example, a is a boundary point of all four sets. Therefore, one of the sets
always contains the limit point of the other.
4.4
Continuous functions
Using the notion of open sets, continuous functions can be defined for arbitrary topological spaces:
Let (X, V ), (Y, W ) be two topological spaces. Let f : X Y be a
function. For any B Y , the preimage of B is f 1 (B) := {x X : f (x)
B}.
f is continuous iff f 1 (O) V for every open set O W .
Note how the continuity of f depends on the way the open sets of X and
Y are defined.
4.4.1
That would mean, that f 1 (O0 ) is exactly the set O that cannot exist
according to (*), which is a contradiction.
Therefore, O0 cannot exist either and f (b) must be a limit point of B.
As f (b) A, f (S) = A B must be connected.
4.5
Homeomorphisms
To describe the properties of configuration spaces, it will be useful to introduce a way to compare different topological spaces with each other.
The equivalence relation of homeomorphisms lets one categorize topological spaces into equivalence classes. Spaces in the same equivalence class
share many properties and can in many ways be considered the same.
Let f : X Y be a bijective function between topological spaces (X, V )
and (Y, W ).
If both f and f 1 are continuous, f is called a homeomorphism and
(X, V ) and (Y, W ) are called homeomorph to each other.
4.5.1
Let
= be a relation between two topological spaces, such that X
=Y
there exists a homeomorphism between X and Y .
Then
= is an equivalence relation:
= is reflexive: The Id function is an homeomorphism that maps each
topological space to itself.
= is symmetric: Because of the bijectivity of f , if f is an homeomorphism that maps X to Y , f 1 is an homeomorphism that maps Y to
X.
= is transitive: Let f be an homeomorphism between X and Y and
g be an homeomorphism between Y and Z. Because the chaining of
functions keeps both bijectivity and continuity, f g is a homeomorphism between X and Z.
4.5.2
Examples of homeomorphisms:
Consider X = [0; 1] and Y = [1; 2], where the open sets are all open
intervals, all half-open intervals around the endpoints and all unions
and finite intersections of them. Then X and Y are homeomorph.
Proof: Consider f : X Y, f (x) := 3x 1.
The open intervals (a; b) of X will be mapped (f (a); f (b)) in Y .
Because 0 a < 1, there will be f (0) f (a) < f (1) 1 f (a) <
2. The same applies to b.
Intervals of the form [0; a), where a 1 will be mapped to [f (0); f (a)) =
[1; f (a)), where f (a) 2. The same applies to intervals of he form
(b; 1], where 0 b.
All open sets in X are mapped to open sets in Y . In the same way,
the inverse of f , f 1 = x+1
3 maps open sets of Y to open sets of X.
Therefore, X and Y are homeomorph.
In the same way, f (x) := tan1 (x/2) is a homeomorphism between
(0; 1) and R.
X = (0; 1] and Y = (0; 1) are not homeomorph.
Assume, there were a continuous bijective function f : X Y between
the two spaces.
f would need to map 1 X to some point f (1) (0; 1). Because f is
bijective, X/{1} would need to be mapped to f (x)/{f (1)}.
However, X/{1} = (0; 1) is connected while f (x)/{f (1)} = (0; f (1))
(f (1); 1) is not. Because continuous functions map connected sets to
connected sets, f cannot be continuous, which is a contradiction.
Therefore a homeomorphism between (0; 1) and (0; 1] cannot exist.
R and R2 are not homeomorph for the same reason.
If a homeomorphism f : R R2 existed, it would need to map
f (R/{a}) to f (R2 )/{f (a)} for any point a R. However, f (R2 )/{f (a)}
is connected, while f (R/{a}) is not.
4.6
There are several methods how new topological spaces can be defined using
existing ones.
4.6.1
Subspace topology
4.6.2
Product topology
Given the topological spaces (X1 , V1 ) and (X2 , V2 ), the cross product X1 X2
can be made into a topological space as well. Its topology is the cross product
V1 V2 along with all unions and finite intersections of them.
4.6.3
Identification
4.7
Manifolds
The definition of topological spaces is very general and gives not enough
information about the nature of the space as required by many algorithms.
Therefore an additional constraint on the topological spaces used for configuration spaces will be made. Those spaces will also be manifolds.
A manifold is a topological space X Rm where, for every point x X,
there exists an open set O X, such that x O and the subspace of O is
homeomorph to Rn .
n is then called the dimension of the manifold.
Note that X need not be homeomorph to Rn for this to hold. There
may be different homeomorphisms, depending on the specific open set O
that contains a given x X.
10
Configuration spaces
5.1
2D rotation
11
cos 2 sin 2
f : S SO(2), f () :=
sin 2 cos 2
1
5.2
3D rotation
Since in (R)3 there are three orthogonal axes of rotation, one could think
that the according manifold is the hypersphere {(x, y, z) R3 : x2 +y 2 +z 2 =
1}, which is homeomorph to S3 .
However, this is not the case as certain non-zero rotations around all
three axes yield the identity transformation. This is called the gimbal
lock problem.
Instead of representing 3D rotations directly in SO(3), quaternions and
the vector-angle representation can be used.
As quaternions are isomorphic to SO(3), there is a bijective function that
can map a quaternion to a transformation matrix in SO(3) and vice-versa.
The set H of quaternions is a generalization of complex numbers, in
which there are three distinct imaginary components i, j, k, with the rule
that i2 = j 2 = k 2 = ijk = 1.
Each quaternion can be seen as a 4-tuple h = a + bi + cj + dk.
Quaternions can represent both vectors and rotations in R3 :
A vector u = (x, y, z) R3 can be represented as an imaginary quaternion
hu = 0 + xi + yj + zk
.
A rotation of degrees in counter-clockwise direction around an axis
through a unit vector v can be represented as a unit quaternion:
h(v,) = cos
12
5.3
5.4
Chains of bodies
A robot may not be rigid but may be modeled as a chain or tree of links,
that can be transformed relative to their predecessors in the chain. To
retrieve the coordinates of a point at the end of a chain, relative to the
coordinate system of the root, this requires multiplying a chain of transformations. As the transformations can again chosen independently to each
other, the overall configuration space is homeomorph to the cross product
of the transformation spaces of each link in the chain, up to the root.
Obstacles
13
We will denote the world space W, the obstacle in the world space O
and the obstacle in the configuration space COBS .
6.1
General definition
In world space, the region occupied by the agent must never overlap with
any region occupied by an obstacle. This means, given a world space W and
an obstacle region O W, for each valid configuration t C \ COBS :
A(t) O =
Therefore:
COBS = {t C : A(t) O =
6 }
6.2
2D Translation
It will be helpful to see that the Minkowski sum of two convex polygons is
always another convex polygon. The proof follows:
For X Rn , let conv(X) be the convex hull of X.
Let A, B Rn be convex polygons. Then it can be shown that A B =
conv(A B).
14
A B conv(A B):
As per definition of the convex hull, each set is fully contained within
its own convex hull. Therefore this assertation always holds.
A B conv(A B):
Let x conv(A B). Then:
a1 , a2 A, b1 , b2 B, [0; 1] such that:
x = (a1 + b1 ) + (1 )(a2 + b2 )
This can be rearranged as follows:
x = (a1 + (1 )a2 ) + (b1 + (1 )b2 )
xAB
6.2.2
Star Algorithm
A
B
B
In: edges(A) = {eA
1 , ..., en }, edges(B) = {e1 , ..., em } of convex polygons
2
A, B R .
C
2: Out: edges(C) = {eC
1 , ..., ek }, where C = A B.
3: Let G = {g1 , ..., gm+n } = edges(A) edges(B), sorted such that (g1 )
(g2 ) ... (gm+n ).
4: for gi G do
5:
if gi edges(A) then
B
6:
Let vjB vert(B) be the common vertex of eB
j1 and ej , where
B
B
(ej1 ) < (gi ) (ej ).
7:
Then: ci := gi + vjB .
8:
end if
9:
if gi edges(B) then
A
10:
Let vjA vert(B) be the common vertex of eA
j1 and ej , where
A
(eA
j1 ) < (gi ) (ej ).
11:
Then: ci := gi + vjA .
12:
end if
13: end for
C
14: return edges(C) = {eC
1 , ..., ek }, k = m + n
The obstacle region can be expressed as a semi-algebraic model: Each
edge yields a corresponding half-plane. The conjunction of all half-planes
represents the obstacle region.
1:
6.2.4
The correctness of the star algorithm can be shown using a tool called supporting plane, introduced by [Lozano-Perez, 1983].
Given a set S R2 and a normal u R2 , the supporting plane (S, u)
2
R is a line with normal u that contains at least one point s S, such that
for all s0 S : hs0 s, ni 0.
The supporting plane can be interpreted as a line with normal n that
intersects S boundary in at least one point and divides R2 into two halfspaces, such that S is completely contained in one of them.
Note that a supporting plane cannot contain points from S interior,
only from its boundary.
If S is a convex polygon, the following properties hold:
Each point of the boundary of S is contained in at least one supporting
plane.
The intersection of S and a supporting plane is either an edge of S or
a vertex of S.
As a visual interpretation, if one varies n around the unit circle, the
supporting plane (S, n) performs a circular sweep around the border of
S.
16
Recall that the angles between edges in a convex polygon must be less
than . Therefore, the edges in a convex polygon are ordered by the angles of their edge normals. A circular sweep of the supporting plane will
encounter all edges in the order of adjacency.
One can prove that, if points from two sets, contained in supporting
planes with the same normal, are added as part of a Minkowski Sum, the
resulting point will be contained in another supporting plane with the same
normal. The proof is as follows:
boundary(A B) =
(A B, u) (A B)
uinR2 ,|u|=1
((A, u) A) ((B, u) B)
uinR2 ,|u|=1
For a given u, the sets ((A, u) A) and ((B, u) B) can take the
following forms:
(1) A vertex from A and a vertex from B.
(2) An edge from A and a vertex from B.
(3) An edge from B and a vertex from A.
(4) An edge from A and a coplanar edge from B.
The first case contributes a single point to the union. However, since
each point of the border of a polygon is part of at least one edge, the same
point will be added again by one of the other three cases. Therefore, this
case can be ignored. The second and third case will each contribute an
edge to the boundary. As the Minkowski addition of an edge and a vertex
translates the edge, the new edge will be a translated copy of the original
edge. The last case will contribute an edge with the length of both original
edges added together. The Minkowski sum of two coplanar edges can also
be interpreted as translating each edge one boundary vertex of the other
edge. Therefore, this case can be seen as contributing two translated edges.
Since all relevant cases contribute translated edges to (A B) and since
the union includes all edges from A and B, the boundary of (A B) consists
exactly of the translated edges from A and B.
To see which case occurs when, it is helpful to examine the set of supporting planes that contain a edge or vertex. (Or, equivalently, the set of
angles of the supporting planes normals)
For S A, let 1 (S) := {n R2 , |n| = 1 : S (A, n)}.
For each edge e, there is 1 (e) = {(e)}. Each edge is contained in
exactly one supporting plane - the plane whose normal is equal to the
outward normal of the edge.
For each vertex v with adjacent edges e1 and e2 , there is 1 (v) =
[(e1 ); (e2 )]. As each vertex is contained in both of its adjoining
edges, it is also contained in their supporting planes. In addition, it
is contained in all supporting planes whose normal angle lies between
the normal angles of the two adjoining edges.
18
6.3
Now, we will additionally allow the agent to rotate, while staying in a world
space of R2 .
A configuration now consists of a translation and a rotation angle .
The Star Algorithm can again be used to generate an obstacle region.
However, now the angles of the agents edge normals, and therefore the order
of the edges and the mapping which edge will be translated by which vertex,
are dependent on .
The obstacle can however still be expressed using semi-algebraic models.
Here, a primitive for each possible edge-vertex combination is added to the
model. For each range of where the vertex-edge mapping stays the same,
the conjunction of all aprop
The primitives representing an edge are non-polynomially dependent on
. To yield a correct semi-algebraic model, can be expressed as a unit
complex number a + bi. As the agent configuration now consists of the 4tuple (a, b, x, y), this changes C to R4 . The constraint that a2 + b2 = 1 must
be added as an additional primitive.
B
Recall that, for convex polygons A and B, eA
i + vj contributes an edge
A
B
A
to (A B) exactly if (eB
j1 ) < (ei ) (ej ). If (ei ) depends on ,
then for each possible vertex-edge mapping, two primitives constraining
B
and one primitive representing eA
i + vj must be added. Along with the
19
6.4
3D Translation
6.5
Paths
We can now define an equivalent to the path through the state transition
graph in the discrete scenario.
20
Path-connected
Conclusion
References
[Guibas & Seidel, 1986] Guibas, L. & Seidel, R. (1986). In Proceedings
ACM Symposium on Computational Geometry pp. 9099,.
[LaValle, 2006] LaValle, S. M. (2006).
Cambridge University Press, Cambridge,
http://planning.cs.uiuc.edu/.
Planning Algorithms.
U.K.
Available at
21