Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan...

27
Planning Near- Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006

Transcript of Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan...

Page 1: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Planning Near-Optimal Corridors amidst ObstaclesRon WeinJur P. van den Berg (U. Utrecht)Dan Halperin

AthensMay 2006

Page 2: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Path Planning

Given a start configuration s and a goal configuration g, find a collision-free path connecting s and g that avoids a given set of obstacles O.

This problem is often difficult, so most algorithms try to find a path, regardless of its quality.

For many applications, it is necessary to have a high-quality path. The resulting path therefore has to undergo some post-processing stages, such as pruning, smoothing, etc.

Page 3: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Using Corridors Instead of making the moving object(s) follow a 1-dimensional

motion path, we let them move in a corridor indicating the general direction for the motion.

Inside the corridor, motion is determined by a local planner (e.g. using the potential field method).

s

g

Page 4: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Applications

For many applications it is better to use a corridor, which allows more flexibility in comparison to having a 1-dimensional path:

coherent group motion,

small moving obstacles (and large static ones),

planning camera motions following a moving character,

avoiding predictable motions (in games),

allowing non-holonomic and kineodynamic planning.

Page 5: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

A corridor C = (t), w(t), wmax in a d-dimensional workspace is the union of the balls:

Where:

: [0, L] d is the backbone path,

w: [0, L] (0, wmax] defines the corridor width,

wmax is the preferred width.

Defining a Corridor

[0, ]

( ); ( )t L

B t w t

Page 6: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Given a corridor C = (t), w(t), wmax, its weighted length, denoted L*(C), is given by:

The Weighted-Length Measure

1

* max( )( )

dw

L C dtw t

We can improve the quality of a corridor by either making it wider (up to the preferred width), or by making its backbone path shorter.

Page 7: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Observation: The width function of an optimal corridor is given by:

where c(p) is the clearance of the point p (its distance from the nearest obstacle).

Properties of an Optimal Corridor

max( ) min ( ) ,w t c t w

Lemma: The backbone path of an optimal corridor connecting any given start and goal positions s and g is smooth.

p

Page 8: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Refraction of an Optimal Path

Snell’s Law: If the width function is not continuous, then the backbone path of the optimal corridor connecting p1 and p2 satisfies:

p1

p2

1

2

w1

w2

2 1 1 2sin sinw w

Page 9: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Optimal Corridors amidst Point Obstacles

We consider planar environments cluttered with point obstacles p1, …, pn 2 and a preferred width wmax .

Let us first assume that the points are well-separated with respect to wmax , that is the discs B(pi; wmax) are pairwise disjoint in their interiors (namely ||pi – pj|| 2wmax).

We first examine what happens when the two endpoints are both in the vicinity of a single obstacle p (inside B(p; wmax)).

Page 10: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

p

r1

r2 1 2A

Using Snell’s Law:

Near a Single Point Obstacle

22 1

1

sin sinr

r

1

BThe Law of Sines on pAB:

Hence: 1 = 1.

11 2

2

12 1

2

sin sin

sin sin

r

r

r

r

Page 11: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

The Logarithmic Spiral

br a e

Assume w.l.o.g. that p is the origin. A curve that forms a constant angle with the radii is a logarithmic spiral, given by the polar equation (where b = cot-1 ):

Page 12: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

The Optimal Backbone Near a Single Point Obstacle

Proposition: Given a single point obstacle located at the origin,

a start position and a goal position , where

rs, rg wmax , the backbone of the optimal corridor connecting s

and g is an arc of the logarithmic spiral , where:

siss r e gi

gg r e

** br a e

*

* 1ln

gs

s g s g

g s

g

g s s

a r r

rb

r

Page 13: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

A Single Point Obstacle:The General Case

Proposition: We are given two points s and g lying outside the

disc B(p; wmax), where p is a point obstacle:

If the segment sg does not intersect

B(p; wmax), it is the optimal backbone.

Otherwise, the optimal backbone is

comprised of the tangent ss*, the circular

arc s*g* and the tangent g*g. wmax

p

g

s

s’

g’ s*

g*

wmax

p

Page 14: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Given a set O = {p1, …, pn} of point obstacles in the plane that are well-separated with respect to wmax , we use the visibility graph of the discs B(p1; wmax), … , B(pn; wmax) to compute optimal corridors. This graph can be constructed in O(n log n + E) time, where E is the number of visibility edges.

The Visibility Graph

Proposition: It is possible to compute the optimal corridor connecting s and g amidst n well-separated point obstacles inO(E log n) time.

Page 15: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

The bounded Voronoi diagram Û (O) of a point set O w.r.t. wmax is comprised of circular arcs (portions of the B(pi; wmax)’s) and line segments (portions of the Voronoi diagram).

It subdivides the plane into:

bounded Voronoi cells of obstacles,

cells with clearance above wmax.

The Bounded Voronoi Diagram

Page 16: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

In a cell whose clearance is above wmax , optimal backbone paths are comprised of line segments and circular arcs.The weighted length of each element equals its “normal” length.

Optimal Paths within Cells

In the bounded Voronoi cell of pi the optimal backbone path

between and is a spiral arc a whose weighted

length is given by:

11

ir e 22

ir e

2 2*max 2 1 2 1( ) ln lnL a w r r

Voronoi edges are also locally optimal.

Page 17: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

We have to consider spiral arcs that shortcut sharp turns (Voronoi vertices and reflex vertices):

Moving amidst Dense Obstacles

pi pi

pi

pjvv1 v2

v1v2

q1

q2

q1 q2

q1

q2

q’

In the worst case we have to consider shortcuts of whose complexity is (n), which take exponential time to compute.

Page 18: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Given > 0, we subdivide the features of Û (O) into small intervals of length c(I) / wmax.(c(I) is the clearance of the interval I, which we assume to be constant as I is small).

The Approximation Scheme (I)

Let be the total weighted length of all the features of Û (O),then there are / intervals in total.

We define a graph D over the set of / intervals, which forms the node set of the graph.

Page 19: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

D contains an edge between I1 and I2 only if the intervals are incident to a common cell. Such an edge may be:

a straight visibility segment,

a circular arc,

a spiral arc,

a straight line segment on a Voronoi edge.

An edge must not cross a feature of Û (O).

The Approximation Scheme (II)

There are O(2 / 2) edges in the graph,which can be constructed in O(n2 / 2) time.

Page 20: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Given two endpoints, we can connect them to the graph D in O(n / ) time and use Dijkstra’s algorithm to obtain an approximation for the optimal backbone path * in O(2 / 2) time.

The Approximation Scheme (III)

Lemma: If * is comprised of the path segments 1, …, k (where k = O(n)), then for each i there exists an edge e in D such that: L*(e) L*( i) + 22 .

Corollary: We can compute in polynomial time a backbone path whose weighted length satisfies: L*() L*( *) + O(n) .

Page 21: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Let us consider a scene cluttered with polygonal obstaclesP = {P1, …, Pk} having n vertices in total.

Polygonal Obstacles

If the polygons are well-separated w.r.t. wmax , we can use the visibility graph of the dilated obstacles to answer corridor-planning queries.

Page 22: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

The features of Û (P) also include:

line segments on dilated obstacle boundaries,

parabolic arcs of the Voronoi diagram,

line segments that separate bounded Voronoi cells of a polygon vertex from the cell of an incident edge.

The Bounded Voronoi Diagramfor Polygons

Page 23: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Using Snell’s Law:

Moving Near a Polygon Edge (I)

01 0

0

sin sinx x

x

0 p0 = (x0,0)

x = 0

1

0 02 1 0

0 0

2 2sin sin sin

x x x x

x x x

2

3

00

0

sin sink

x k x

x

Note that we may have a reflection point!

Page 24: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Moving Near a Polygon Edge (II)

Let us now write:

0

2 2 2 20 0

sin sintan

1 sin sink

k k

k

xy x x x

x x

Let x 0:

0

2 2 200 0

2 2 20 0

0

sin'( ) lim

sin

1( ) sin

sin

k

x

y xy x

x x x

y x x x K

We obtained an equation of a circle whose center lies on x = 0.

Page 25: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

The Optimal Backbone Near a Polygon Edge

Proposition: The optimal backbone path between s and g near

a polygon edge supported by x = 0 is a circular arc a of radius r*

centered at (0, y*), where:

2 2*

22 22* 2 2

2

2 2

1 1

2 4 4

s g g s

g s

g s

s g g s

g s

y y x xy

y y

x xr x x y y

y y

The weighted length of this arc is given by ( and

w.r.t. the circle center):

siss r e

gi

gg r e *

max( ) ln tan ln tan2 2g sL a w

Page 26: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

We can generalize our approximation scheme for the case of polygonal obstacles. For any > 0, we can construct a graph D based on the structure of Û (P) in O(n2 / 2) time (w.r.t. a given wmax value).

Optimal Corridors amidst Polygons

For any two given endpoints, we can query D in O(2 / 2) time and obtain a path that approximates the best backbone path up to an error of O(n) .

Page 27: Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.

Thank you!