You are on page 1of 23

t Bonn

Rheinische Friedrich-Wilhelms-Universita
r Informatik I
Institut fu

Philipp Serafin

Seminar report:
Continuous
configuration spaces
March 31, 2012

Seminararbeit im Wintersemester 2011

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

3 Representation of world and agent


3.1 Semi-algebraic primitives . . . . . . . . . . . . . . . . . . . .
3.2 Transformations of geometric models . . . . . . . . . . . . . .

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

Motivational example: Piano movers problem

1.1

Discrete formulation

Consider the problem of moving a piano throughout the rooms of a cramped


flat. One could try and model the piano movers problem as a discrete
planning problem, resulting in a Tetris-like puzzle game:
Consider as the world space a two-dimensional grid of tiles where certain
tiles are marked as obstacles. At each point in time, the agent occupies a
number of non-obstacle tiles.
Available actions of the agent are:
Move a tile up, left, right or down
rotate 90 clockwise or counter-clockwise
As a discrete planning problem, this scenario would be formulated in a
state transition graph.
If one considers the agent rigid, i.e. an action moves all occupied tiles
into a common direction, then a state would be a 3-tuple:
The X- and Y offset of the tiles occupied by the agent;
The current orientation (0 , 90 , 180 , 270 )
Each edge in the graph corresponds to an action performed in a certain
state. Certain transitions might not be valid, e.g. if the agent would pass
through obstacles during a 90 turn. Certain states might not be reachable
at all, e.g. states in which the agent would occupy obstacle tiles. States of
such invalid transitions are not connected with edges.
The challenges of planning in a discrete case like this would be:
Given representations of world space, agent and actions, derive the
state transition graph.
Given a start and destination state, find a path through the state
transition graph.

1.2

Goal for continuous formulation

The discrete formulation of the piano movers problem leaves a lot to be


desired. It would be desirable to use more flexible shapes and move and
turn the agent by arbitrary degrees. The solution is to use a different model
for the state space that contains a continuum of states.
Requirements for such a space are:
Some representation of the states than an agent can assume.
3

Some representation of the constraints that govern which transitions


between states are valid. Those restrictions might arise from properties
of the agent itself or from interactions between agent and world.
Some notion of a path between a start and a goal state in the state
space.
However, because we have now uncountably infinitely many states, we
cannot represent the transitions between states as edges in a graph anymore.
The resulting continuous state space will be called a configuration space.

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.

Representation of world and agent

We will use R2 and R3 as basic world spaces.

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

Transformations of geometric models

Semi-algebraic models may be used to describe both the agent as well as


obstacles in the world. The placement of the agent in the world is described
4

by applying a coordinate transformation to the agents model. (The initial


state of the agent is represented as the identity transformation) We assume
the agent can change its angle and position. Therefore its state in the world
is defined by a homogeneous transformation.
In R2 , every point of the agents region is transformed by a matrix

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

Let X be a set and V 2X a collection of subsets of X. X is called a


topological space with topology V iff it satisfies the following axioms:
The union of any number of sets in V even infinitely many, is in V .
The intersection of finitely many sets in V is in V .
X and are in V .

All sets in V are called open sets.


The complement of an open set is called a closed set. This implies
that some sets, like X and are both open and closed and other sets can
be neither open nor closed.

4.2

Boundary points

Given the collection of open sets of a topological space, the elements or


points of sets in that space can be characterized.
Given a set U X, where(X, W ) is a topological space,
A point u U is an interior point of U , if there exists an open set
that contains u and lies completely in U .
u is called an exterior point of U if there exists an open set containing u that lies completely outside U .
If neither open set exists, u is called a Boundary point of U .
Boundary and interior points are also called limit points.
4.2.1

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

One property that distinguishes different topological spaces is the notion of


connectedness. This is related (though not identical) with the question if a
path that connects two elements of a topological space can be found.
A set S of a topological space is connected, if for all non-empty, disjoint
subsets A, B, such that A B = , A B = S, one set contains a limit point
of the other. Informally speaking, this means, there is no point between
A and B that does not belong to S. (Though there are connected sets that
cannot be visualized like this)
6

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

Continuous functions and connected sets

It can be proven that continuous functions map connected sets to connected


sets:
Let f : X Y a continuous function between two topological spaces.
Let S X be connected. Then f (S) is connected.
Proof: Assume that f (S) is cut into non-empty, disjoint subsets A, B,
such that A B = , A B = f (S). If f (S) is connected, either A or B
must contain a limit point of the other.
Consider the preimages:
f 1 (A) = {x X : f (x) A}
f 1 (B) = {x X : f (x) B}
As A and B are disjoint and f can map any value only to either A or B,
f 1 (A) and f 1 (B) must be non-empty and disjoint, too.
As S f 1 (A) f 1 (B) and S is connected, either f 1 (A) or f 1 (B)
must contain a limit point of the other.
Assume that b f 1 (A) is a limit point of f 1 (B). According to the
definition of limit points, this implies, that:
6 O X, O open, such that b O, f 1 (B) O = (*).
Now assume that f (b) is not a limit point of B.
As b f 1 (A), it is implied that f (b) A, f (b)
/ B. Then there must
exist some open set O0 Y , such that f (b) O0 , O0 B = .
However, that would imply that f 1 (O0 ) f 1 (B) = , that b f 1 (O0 )
and that f 1 (O0 ) is open since f is continuous.
7

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

Existence of homeomorphisms as equivalence relation

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

Methods of deriving topological spaces

There are several methods how new topological spaces can be defined using
existing ones.
4.6.1

Subspace topology

Given a topological space (X, V ), any subset S X can be made into a


new topological space by using V 0 := S V as the new topology.
This may result in certain sets be open in (S, V 0 ) that were not open in
(X, V ).
Example:
[0; 1] is a subspace topology of R. The set (0.5; 1] is not open in R.
However, because (0.5; 1.5) is open in R and (0.5; 1] = (0.5; 1.5) [0; 1], it is
open in [0; 1].

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

A third method of deriving topological spaces is defining a quotient or


identification space. The quotient space takes certain points of the original
space and declares them equivalent.
Let (X, V ) be a topological space and be an equivalence relation on X.
Let [x] be the equivalence class of x and [S]1 the elements of all equivalence
classes in S.
Then X/ = (X 0 , V 0 ) is a new topological space with X 0 = [X] the set of
all equivalence classes of X and V 0 defined such that U V 0 [U ]1 V .
Example: The topological space S1 :
Consider X = ([0; 1], V ) as a subspace topology of R.
Now define the equivalence relation as follows:
:= {{x} : x (0; 1)} {{0, 1}}
The points 0 and 1 are now considered equivalent according to .
Then X 0 = [(0; 1)] {{0, 1}}.
The open sets of X/ are considerably different than the ones of X. So
is (a; 1] open in X but [(a; 1]] = [(a; 1)] {{0, 1}} is not open in X/ since
[([(a; 1)] {{0, 1}})]1 = (a; 1) {0, 1} = {0} (a; 1], which is not open in
X.
This particular topological space is called S1 and expresses the topological concept of a circle. It is neither homeomorph to [0; 1] not (0; 1), it is however homeomorph to the unit circle subspace in R2 , {(x, y) R2 : x2 + y 2 =
1}, via the homeomorphism f : S1 R2 , f (t) := (cos(2t), sin(2t)).

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

Example: The space S1 is not homeomorph to R. However, it is a


manifold, because it may be fully covered by open sets that are homeomorph
to R.
A manifold in general does not define any consistent metric or other
geometric notions, as the homeomorphisms may be incompatible. However,
additional requirements can be posed on the topological space, for example
that it be a riemannian manifold if a metric is needed.

Configuration spaces

We will now consider how to turn the geometric transformations of our


agent into manifolds. We start with rigid agents that can rotate, then show
translation and finally show transformation of kinematic chains.

5.1

2D rotation

A rotation matrix in Rn or element of the special orthogonal group SO(n)


is a transformation that preserves distances, angles and orientation.
In order to preserve angles, the base vectors must be orthogonal. To
preserve distance, the scale factor must be 1 or -1, which requires the determinant to be 1 or -1. To preserve orientation, the determinant must be
positive. Therefore, the determinant must be 1.
For thetwo-dimensional
case, this leads to the following constraints:

a b
R22 , the following equations hold:
Given
c d
a2 + b2 = 1
ac + bd = 0
c2 + d2 = 1
ad bc = 1
The manifold of those matrices is a subspace of R4 that is homeomorph
to the unit circle in R2 and, by equivalence, to S1 . The homeomorphism
works as follows:
Given a point (x, y) on the unit circle, choose this point as the first base
vector. As the second base vector must be orthogonal to n, the determinant
must be 1 and the vector must be a unit vector, too, the transformation is
uniquely defined.
Combining this with the homeomorphism from S1 to the unit circle,
yields the standard transformation matrix which satisfies the previous equations:

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

+ hv sin = cos + x sin + y sin + z sin


2
2
2
2
2
2

Multiple rotations can be chained together by multiplying rotations


quaternions. As quaternion multiplication is not commutative, the order
of multiplication is important.
The rotated image u0 of a vector u can be obtained by v 0 := h(v,) hu h1
(v,) ,
h ich jdh k
where h1 := abab
is the reciproke of h.
2 +b2 +c2 +d2
Using quaternions, the gimbal lock problem becomes easier to handle: A
rotation quaternion can be represented by a unit vector and an angle. The
space of rotation quaternions is therefore homeomorph to (S)2 (S)1 = (S)3 .
However, the space of actual rotation transformations is not, since the two
quaternions h and h represent the same rotation. This corresponds to the
vector-angle tuples (v, ) and (v, 2 ), or a rotation in counter-clockwise
direction around axis v and a rotation in clockwise direction around axis v.

12

To gain the actual space of rotations, an identification space can be


used with an equivalence relation that declares h and h equivalent. The
resulting space is the real projective plane, RP() 3, which corresponds to
the set of all lines through the origin of R4 or a half-sphere in R4 , where each
point is equivalent with its antipodal point on the opposite hemisphere.

5.3

Translation and Rotation

If additionally translation should be considered, homogeneous transformation matrices 


and the
 projective coordinate space can be used.
R v
The set {
: R SO(n), v Rn } is the set of homogeneous
0 1
transformation matrices in Rn . Each matrix corresponds to a translation
via the vector v, followed by a rotation via the rotation matrix R. As R
and v can be independently chosen, the topological space is homeomorph to
the cross product topology Rn SO(n). For n = 2, this is homeomorph to
R2 S1 , for n = 3 to R3 RP() 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

Given a representation A(t) of the agent and a configuration space C, the


obstacle region COBS C is the set of all configurations t that the agent may
not assume. This can be used to model e.g. physical obstacles or limitations
of the agents joints.
In this section, we will show exemplarily how obstacles for certain agents
and certain world spaces can be represented in the appropriate configuration
space. The solution to this problem depends strongly on the kind of configuration space at hand. For many non-trivial configuration spaces, there
exists no efficient solution. In this report, algorithms are shown for agents
capable of rotation and translation in R2 and agents capable of translation
in R3 . Its assumed that both agent and obstacle are modeled as two single,
convex polyhedra. However, the same algorithms can also be generalized for
nonconvex polyhedra.

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

In the case of a robot capable of 2D translation, there is C = R2 , i.e. each


configuration t C represents a translation of all points of the agent region:
A(t) = {p + t : p A(0)} =: A(0) t
The operation is also called Minkowski addition.
Taking into account the above constraint, we can formulate COBS :
COBS = {t C : A(t) O =
6 }
= {t C : (A(0) t) O =
6 }
= {t C : a A(0) : a + t = o O}
= {o a : o O, a A(0)}
=: O A(0)
The operation is also called Minkowski difference. In parallel, the
Minkowski sum is defined as:
A B := {a + b : a A, b B}
It follows that A B = A (B), i.e. the Minkowski difference is the
Minkowski sum with B mirrored through the origin.
We will now show algorithms for calculating the Minkowski sum efficiently.
6.2.1

Minkowski Sum and convex polygons

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

Trivial algorithm for Minkowski sum

Let A, B be convex polygons with vertices vert(A), vert(B), |vert(A)| =


n, |vert(B)| = m, such that A = conv(vert(A)), B = conv(vert(B)).
As the Minkowski sum of convex polygons is again convex, it can be
expressed in terms of vertices:
A B = conv(A B)
= conv(conv(vert(A)) conv(vert(B)))
= conv(vert(A) vert(B))

The convex hull of a set of k vertices can be calculated in O(k log k)


time. The Minkowski sum of vert(A) and vert(B) produce a maximum of
nm vertices. Therefore the running time using the trivial algorithm would
be O(mn log mn).
The Star Algorithm can be used to calculate the Minkowsky difference
in O(m + n) instead.
6.2.3

Star Algorithm

The Star Algorithm can be formulated as follows:


For a given convex polygon A R2 , let {v1A , ..., vnA } = vert(A) be its
A
vertices in counter-clockwise order. Let {eA
1 , ..., en } = edges(A) be the
A form the endpoints
edges of its border, such that for 1 i < n, viA and vi+1
A
of edge ei . Let (ei ) be the angle if the inward edge normal of ei .
Then Star Algorithm works as follows:
15

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

Correctness of Star Algorithm

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:

Let A, B R2 be two convex polygons.


Let u R2 , xA (A, u) A, xB (B, u) B .
Then, for all yA A, yB B follows:
hyA xA , ui 0, hyB xB , ui 0
hyA xA , ui + hyB xB , ui 0
hyA xA + yB xB , ui 0
h(yA + yB ) (xA + xB ), ui 0
(xA + xB ) (A B, u) (A B)
((A, u) A) ((B, u) B) (A B, u) (A B)
Furthermore:
((A, u) A) ((B, u) B) (A B, u) (A B)
((A, u) (B, u)) (A B) (A B, u) (A B)
((A, u) (B, u)) (A B, u)
As (A, u) and (B, u) are parallel, their Minkowski Sum is again a line.
Since a line cannot be a true subset of another line, there is:
((A, u) (B, u)) = (A B, u)
And therefore:
((A, u) A) ((B, u) B) = (A B, u) (A B)

Since A, B and A B are convex, each point of the boundary of A B


can be derived by adding the boundary points of A and B, contained in the
supporting planes with the same normal. Therefore:
17

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

Assume (A, u) is a supporting plane that contains an edge of A. If there


is an edge in B with the same normal angle, the parallel supporting plane
(B, u) will contain that edge. This will result in the sum of two edges. If
there is no parallel edge, the supporting plane will contain the single vertex
between adjoining edges of smaller and larger normal angle. This will result
in the sum of an edge and a vertex. The same is true for the supporting
planes of edges in B.
Cases (2) and (3) are directly handled in lines 6 and 10 of the algorithm.
As case (4) can be interpreted as two translated edges, it is handled by those
lines, too.
Therefore, the star algorithm is correct.
6.2.5

Run time of Star Algorithm

If as input, there is given lists of the edges of A and B in order of adjacency,


the edges are already ordered by angle. Therefore, the edges do not need
to be sorted again and must only be merged, which can be done in linear
time. Finding the correct translation vertex for a given edge can be done
in constant time. Therefore, given convex polygons A, B with |edges(A)| =
n, |edges(B)| = m, the run time is O(n + m).

6.3

2D Translation and Rotation

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

primitive restricting the complex numbers, this results in 3nm + 1 = O(nm)


primitives for |edges(A)| = n, |edges(B)| = m.

6.4

3D Translation

The concepts of the star algorithm can be generalized to R3 as follows:


Recall that the Minkowski sum in R2 translates edges and vertices that are
contained in supporting planes with the same normal. The same holds in
R3 for points in supporting spaces with the same normal.
The boundary of a convex polyhedron in R3 is composed three kinds of
objects: vertices, edges and faces.
It is shown in [Guibas & Seidel, 1986] that the normals 1 of the containing supporting spaces for these objects can be characterized as follows:
For a face f , 1 (f ) contains f 0 s outward normal as the sole element.
For an edge e, 1 (e) contains the normals of its two adjacent faces,
along with all interpolations between them.
For a vertex v, 1 (v) contains the union of all 1 (e) of all adjacent
edges e, as well as all interpolations between its elements.
The key part of efficiently calculating the Minkowski sum in R3 is quickly
finding vertices, edges or faces in both polyhedra whose 1 have a nonempty
intersection.
Note that, unlike the R2 case, additional combinations of objects must
be considered. In particular, the sum of two coplanar (but not parallel)
edges yields a new face.
[Guibas & Seidel, 1986] presents an algorithm to find matching objects
and calculate the Minkowski sum accordingly in O(n + m + k) time, where
|f aces(A)| = n, |f aces(B)| = m, |f aces(A B)| = k.

6.5

Generalization to nonconvex polyhedra

The above algorithms can be generalized to sets of convex polyhedra in a


straight-forward way. Let A = A1 A2 ... An , B = B1 BS2 ... Bm be
composed of finitely many convex polyhedra. Then A B = Ai ,Bj Ai Bj .
Note that this will perform nm sums of convex polyhedra. The union
operation may additionally increase the run time.
The sum of nonconvex polyhedra can be calculated by first decomposing
the nonconvex polyhedra into sets of convex polyhedra.

Paths

We can now define an equivalent to the path through the state transition
graph in the discrete scenario.
20

Let X be a topological space. A path is a continuous function :


[0; 1] X, with f (0) the start and f (1) the end point.
The properties of the topological space X already impose certain restrictions on possible path. With the requirement that ([0; 1]) lies completely
outside an obstacle region O X, additional constraints can be modeled,
analogous to missing edges in the state transition graph.
The requirement that be continuous prevents it from jumping and
skipping obstacles in its way.
7.0.1

Path-connected

A topological space X is called path connected, if for all x1 , x2 X, there


is a path , such that (0) = x1 , (1) = x2 . Generally, path-connectivity
implies connectivity of a space, though the opposite is not always true.
However, if the topological space is a manifold, then connectivity and pathconnectivity are equivalent.

Conclusion

In this report, we have shown a number of general mathematical tools to


model continuous motion-planning problems. Using the notion of configuration spaces, the motion planning problem can be formulated as finding a
path between two points in an appropriate topological space that avoids an
obstacle region.
Additional structures on the topological spaces are necessary to solve
problems like, e.g. finding the shortest path. Also, in many cases, like
the case of a long kinematic chain, configuration spaces might become too
large to represent explicitly. Algorithms may then use other, implicit representations. However, the underlying structure can still be mathematically
described using the tools presented.

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

[Lozano-Perez, 1983] Lozano-Perez, T. (1983). IEEE Transactions on Computing C-32, 108120.

21

You might also like