Upload
jock
View
32
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Visibility Graphs. Shmuel Wimer Bar-Ilan Univ., Eng. Faculty Technion, EE Faculty. We would like to find a good path, rather than any feasible path as done in motion planning. Shortest path is usually good, but not necessarily the best. Number of turns is important, speed is important, etc. . - PowerPoint PPT Presentation
Citation preview
1
Visibility Graphs
May 2012
Shmuel WimerBar-Ilan Univ., Eng. Faculty
Technion, EE Faculty
2
We would like to find a good path, rather than any feasible path as done in motion planning.Shortest path is usually good, but not necessarily the best. Number of turns is important, speed is important, etc.
We consider only translating planar robot and seek shortest path.May 2012
3
Roadmap Reminder
Get trapezoids of free area
Free area obtained Minkowski sum
Roadmap construction
Find shortest path in roadmap
This is not necessarily the shortest pathMay 2012
4
startP
goalP
Roadmap
When BFS is used, path of minimum number of vertices is found.
For weighted roadmap Dijkstra’s algorithm can be used.
Shortest path of roadmap
Shortest path
May 2012
5
start goal Any shortest path between and
among the set of polygonl objects is a polygonalpath whose inner vertices are of .
P P:Lemma
SS
If the shortest path was not polygonal, it would
have a point interior of freespace (not a vertex of ), andnot contained in any linesegment of (otherwise must be polygonal).
p
:Proof
S
May 2012
6
A disc around can be found and a short cut canbe established, yielding a paths shorter than .
p
May 2012
is polygonal, and assume it has a vertex interiorof free area. As before, a disc and a shortcut can beestablished, yielding a shorter path.
Similarly, cannot lie on the interior of an obstacle'sedge. Otherwise there was a disc partially intersectingthe interior of the free area and a shortacut couls befound.
7
Visibility Graph: Nodes are the vertices in S. Edge is defined
for each vertices visible to each other.
May 2012
start goal
*vis
*start goal
The shortest path between and
among a set of disjoint polygonal obstacles
consists of arcs of the visibility graph ,
where , .
P P
G
P P
Corollary
S
S
S S
:
startPgoalP
Shortest path
May 2012 8
9
start goal
vis start goal
vis
start goal
( , , ) {
VisibilityGraph ( , ) ;
Assign weigh // Euclidet to each , ; Find shortest path from to with
an length Dijkstr
uv
void p p
G p p
e u v Gp p
ShortestPath
S
S
a's algorithm ;
}
With n polygonal objects and O(n) nodes, naïve computation
of Gvis would take O(n3) time.
Dijkstra’s algorithm finds shortest path between two nodes of
n nodes and k arcs graph in O(nlogn + k) time.
It is possible to compute Gvis in O(n2logn) time.
May 2012
10
Computing the Visibility Graph
( ) { Initialize , , is all vertices of , ;
{ VisibleVertices( , ) ; { add , to }
} , ; }
graphG V E V E
u VW u
v W e u v E
return G V E
VisibilityGraph S S
S
Checking the visibility between two vertices, not much can be done. All objects must be tested for intersection, taking O(n) time. By ordering the vertices it is possible to accelerate tests by using info obtained in previous tests.
May 2012
11
1
2
3
4
5
6
7
8
9
10
1112
13
14
p
Scanning Ray – Rotational Planar Sweep
May 2012
12
p
w
The intersection status of edges with the scanning ray is stored
in a balanced binary tree T, were edges are stored at leaves. It
is possible by bi-section to locate the vertex w with respect to
the edges. It is visible from p if it falls left to the leftmost
(nearest to p) leaf.
If p and w are of the same
polygon w is invisible.
May 2012
13
1e
2e3e 4e
5e6e
1e
2e
3e
4e
5e 6e
1e
2e
3e
4e
5e
Scanning ray maintains a binary balances tree T. Vertices are
first sorted in clockwise order. Vertices are checked for visibility
and then incident edges are inserted and / or deleted to / from
T, depending on their position with respect to the scanning ray.
May 2012
14
All such operations take O(logn) time per vertex.
T is initialized by inserting all the edges intersecting the ray
of negative X axis (angle 0), an operation taking 0(nlogn)
time.
Vertices are sorted clockwise starting from angle 0.
May 2012
15
1w
2w 4w
3w
p
5w
6w8w
7w
a
b
c
d
e
f h
g
initialize : , , ,h f d bT
1 : , , ,w h g d bT
2 : , , ,w h g d cT
3 : ,w d cT
4 : w T
5 : ,w h eT
6 : , , ,w h e d aT
7 : , , ,w h f d aT
8 : , , ,w h f d bT
May 2012
16
1
( , ) { 1. Sort vertices of clockwise w.r.t . In case of tie closer precedes farther. Let , , be the
points ; 2. Construct balanced search tree sto
n
points pp
w w
VisibleVertices
SS
T
// initialize visible point
ring edge intersections with scanning ray ; Initialize ; ; ( 1
s// traverse all points to ) {
Visible ( , ) // visibility tes{ } ti i
Wfor i n
if p w W W w
T
add to startin / / edges / at delete from end . }
g }
g in;
iwreturn W
T
May 2012
17
1iw
p
iw
1iw
p
iw1iw
p
iw
1iw
p
iw
wi is not visiblewi is visible
All special cases can be detected at visibility test of wi
May 2012
18
1
// ordinary hiding tes
( , ) ( intersects 's object, locally at ) {return }
(( 1 ) || ( is not on )) { find in the leftmost edge
t
i
i i i
i i
boolean p wif pw w w false
else if i w pw
Visible
T
1
1
// colinea
; (( exists) && (intersects )) {return } {return } }
( is not visible) {return } {
r , ,
find in e
i i
i
i
eif
p w
e pw e falseelse true
else if w falsee
w
lse
T 1dge intersecting ; ( exists) {return } {return }}}
i ie w wif e falseelse true
May 2012
19
Probabilistic Roadmaps
Planar problems with translational robot (2 degrees of freedom)
are simple. Finding visibility graph explodes with degrees of
freedom increase.
- configurations space (coordinates, rotation angle, etc.) - a configuration
- collision free configurations
: a local planner which for every ,
returns eithe
free
free free free free
Qq QQ
Q Q q q Q Q
r a collision free path from to , or if such one not exists.
: 0 is a distance function
q q
d Q Q
R
May 2012
20
(# nodes: , # closest neighbors ) { ; ; while
// initialization// find nodes i( ) {
randomly dra
n
w ; if ( ) { }
} { g
free
free
graph n kV E
V n
q Q q Q V V
n
q
q V
Q
ConstructRoadMap
et , the closest neighbors according to }
{
if ( ( , ) && ( , ) ) { , }
}}
q
q
N V k d
q N
q q E q q E E q q
Random roadmap construction
May 2012
21May 2012
22
Sampling Strategies
Random sampling works well in many practical cases involving
robots with large number of degrees of freedom. It is not well
performing when essential narrow passage exists, or when
more intensive sampling is required near obstacles.
Quasirandom is a deterministic alternative to random sampling,
ensuring better uniformity.
Let be a sample of points in a space , .
How uniformly covers ?
P X P N
P X
May 2012
23
is a collection of axis-alined rectangular subsetsof . is a rectangle. is a measure.X R R
R
May 2012
The of with respect to range space
over is defined as , sup .R
PP RR
X D PX N
R
R
R
discrepancy
Discrepancy provides a measure of how uniformly points
are distributed over a space X
24
The largest portion of that contains no points of is called the of point set with
respect to the metric , sup min , .p Px X
XP P
P x p
dispersion
July 2011
1
For a sample of points in -dimentional unit cube1there exists , .
2 d
P N d
PN
**
1So to obtain dispersion at least .2
To minimize dispersion grid sampling is the best.
d
N
25May 2012
For 0,1 sequence gives a
set of samples that minimizes both dispersion anddiscrepancy.
X Van der Corput
1
Its sample is generated by using the binary
representation 2 , 0,1 .
The element, , is defined as
2 .
th
ii ii
th
iii
n
n a a
n n
n a
26
1 1 3 1 5The first 16 samples are 0, , , , , ,2 4 4 8 8
3 7 1 1 9 5 13 3 11 7 15, , , , , , , , , , 8 8 8 16 16 16 16 16 16 16 16
May 2012
Van det Corput sequence can be used only for thereal line. generalizes it to dimensions.
dHalton sequence
Given a sequence = 2,3,5,7, of prime
numbers, an integer is represented in base
by , 0,1, , 1 .
i
j
iij j ij ji
b
n b
n a b a b
27
1
1 2
is defined as .
The sample is then defined by thecoordinates
, , , .
iij ji
th
n
j j
d
b b
b b b
n a b
n
p n n n
May 2012