visibility graph team 10 nakwon lee, dongwoo kim

48
Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Upload: cyrus-colding

Post on 14-Dec-2015

233 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Visibility GraphTeam 10

NakWon Lee, Dongwoo Kim

Page 2: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Robot Motion Planning

• Consider the case of point robot• The polygons in S are obstacles, and their total

number of edges is denoted by n• The point robot can touch obstacles, because ob-

stacles are open set.• Start position . Goal position .• Paths do not intersect the interior of any of the ob-

stacles.

Page 3: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Robot Motion Planning

• Use trapezoidal map of the free configuration space .• Configuration space is the parameter space of a ro-

bot . Denoted by .• For a point robot, was simply the empty space be-

tween obstacles.

Page 4: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Configuration Space

Page 5: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Construct the trapezoidal map for configuration space .• Construct the load map .• Find the trapezoids which have the start point or

end point.• Find the shortest route in the load map using

breadth first search algorithm.

Page 6: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

Page 7: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Shortest path in road map is not a real shortest path• because some arcs are btw nodes that are far apart,

whereas others are btw nodes that are close to each other.

• It is just minimum number of hop.

• To improve this problem, give each arc a weight cor-responding to the Euclidean length, and use graph search algorithm that find the shortest path in a weighted graph.• Dijkstra's algorithm

• But, it is still not a shortest path.

Page 8: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Think of this path as an elastic rubber band.• Fix the endpoints at the start and

goal position.• Try to tighten the rubber band.• It will be stopped by the obstacles.

• The new path will follow parts of the obstacle boundaries and straight line segments through open space.

Page 9: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Lemma 15.1 Any shortest path between and among a set of disjoint polygonal obstacles is a polygonal path whose inner vertices are vertices of • Inner vertex – A vertex that is not the begin or endpoint

of the path.

Page 10: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Proof.• Suppose for a contradiction that a shortest path is not

polygonal.• Point on that lies in the interior of the free space with

the property that no line segment containing is con-tained in .

𝑝

𝑛𝑜𝑡𝑝𝜏𝑣1 𝑣2

Page 11: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• There is a disc of positive radius centered at that is completely contained in the free space.• Part of inside the disk, which is not a

straight line segment, can be shortened by replacing it with the segment con-necting the points which lie on circle.• Contradict the theorem “any shortest

path must be locally shortest”.

Page 12: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Now consider a vertex on . It cannot lies in the interior of the free space.

• Consider the disc centered at such that half of the disc is contained in the free space.

• Can replace the sub path inside the disc with a straight line segment.

• The only possibility left is that is an obstacle vertex.

𝑣

𝜏𝑣1

𝑣2

𝑣

𝜏 𝑣1

𝑣2

short cut

Page 13: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Construct a road map with this characterization.• This road map is visibility graph of , denoted by .• Its nodes are the vertices of .• There is an edge between vertices and if they can

see each other.• The segment dose not intersect the interior of any

obstacle in .

Page 14: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• Two vertices that can see each other are called vis-ible.• The segment connecting visible two vertices is

called a visibility edge.• Endpoint of the same obstacle edge always see

each other.• Hence, the obstacle edges form a subset of the

edges of .

Page 15: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

• To make a complete road map to find shortest path, add start and goal point as vertices to .• So we consider the visibility graph of the set .• Corollary 15.2 The shortest path between and

among a set of disjoint polygonal obstacles con-sists of arcs of the visibility graph , where .

Page 16: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Shortest Paths

Page 17: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Visibility Graph

Definition: • The visibility graph of s and t and the obstacle set is

a graph whose vertices are s and t the obstacle ver-tices, and vertices v and w are joined by an edge if v and w are either mutually visible or if (v, w) is an edge of some obstacle.

Page 18: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Visibility Graph

Page 19: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim
Page 20: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Visible Vertices

Page 21: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Visible Vertices

Page 22: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Visible

DefinitionTwo points p and q are mutually visible if the open

line segment joining them doesn't intersect the in-terior of any obstacle.

Page 23: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim
Page 24: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Search Tree

Page 25: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph• VisibleVertices: – (sorting)• Operation on blanced search tree :

• For every vertices with Visible Vertices.• VisibilityGraph –

Page 26: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph• Give an procedure for constructing.• is the number of line segments in the plane.

• No three vertices are collinear??• The algorithm is not output sensitive.• An algorithm ( is the number of edges in visibility

graph) is existent but quite complicated.

Page 27: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph• The text’s algorithm operates by doing sweep one

vertex at a time.• New algorithm does the sweep for all vertices si-

multaneously.• When we use the arrangement, angular sort can be

performed for all vertices in time. • If we build the entire arrangement, this sorting al-

gorithm will involve space.• However it can be implemented in space using an

algorithm called topological plane sweep.

Page 28: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph• First, recall the algorithm for computing trapezoidal

maps.• Shoot a bullet up and down from every vertex until

it hits its first line segment.• Angle continuously sweeps out all slopes from to .• All bullet lines attached to all the vertices begin to

turn slowly counterclockwise.

Page 29: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph• The question is what are the significant event

points, and what happens with each event?

Page 30: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph• It is useful to view the problem both in its primal

and dual form.• ( is the number of segments) segment end points ,

its dual line .• Significant event occurs whenever a bullet path in

the primal plane jumps from one line segment to another.• This occurs when reaches the slope of the line join-

ing two visible endpoints and .

Page 31: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph

event

event

event

Page 32: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Computing the Visibility Graph• To keep track of which endpoints are visible and

which are not is complicated.• Instead we will take events to be all angles be-

tween two endpoints, whether they are visible or not.• By duality, the slope of such an event will corre-

spond to the -coordinate of the intersection of dual lines and in the dual arrangement.

Page 33: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Dual ArrangementDual of point D

Dual of point C

x-coordinate is the slope of dual segment

Page 34: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Find Events

• By sweeping the arrangement of the dual lines from left-to-right, we will enumerate all the slope events in angular order.

Page 35: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Find EventsAngular order

• By using topological plane sweep, event do not need to be sorted.

Page 36: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Topological Plane Sweep

• Provides a way to sweep an arrangement of lines using a “flexible” sweeping line.• Because events do not

need to be sorted, we can avoid factor.

Page 37: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Topological Plane Sweep

• Upper horizon tree

• Lower horizon tree

Page 38: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Topological Plane Sweep

• Data structure• – array of line equation. , if the th line of , , is .• – an array representing the upper horizon tree. is a pair of in-

dices indicating the lines that delimit the segment of in the up-per horizon tree to the left and to the right.

• – represents the lower horizon tree.• – a set of integers, represented as a stack. If is in , then and

share a common right endpoint.• – an array holding the current sequence of indices that form the

lines of the cut.• – a list of pairs of indices indicating the lines delimiting each

edge of the cut. thus encodes the endpoints of the edge on . The same convention as that above is used for missing endpoints.

Page 39: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Topological Plane Sweep

If segment is the leftmost on , set

If segment is the rightmost on , set

Page 40: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Topological Plane Sweep

• AlgorithmInitialization:• 1. Sort the lines of the arrangement by slope.• 2. Find the leftmost and the rightmost intersection point of the lines. Let the

two points be and .• 3. Create vertical lines , as left boundary and right boundary. Determine the

intersection points of lines with the boundaries.• 4. Create upper horizon tree: Insert . Assume have been inserted. These lines

form an upper bay. To insert , begin at its endpoint on the left boundary. Walk in counter clockwise order around the bay till we find the intersection point of with an edge.

• 5. Create lower horizon tree similarly by starting the travers at endpoints on the right boundary.

• 6. Initialize : Let and . If intersects to the left of the intersection point of and then the right delimiting line of is . Otherwise, the right delimiting line of is .

• 7. Initialize by scanning .

Page 41: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Topological Plane Sweep

• AlgorithmElementary Step• While • 1. Pop from • 2. Swap , /*lines are going to cross, after the elementary

step*/• 3. , /*the point of elementary step becomes the left

endpoint of the two new cut edges */• 4. Update , .• 5. , /* find the new right endpoints */• 6. If then push into . If then push into . /* push valid

vertices formed after sweeping into I if there is any */

Page 42: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

What Happens at Each Event• For each vertex , there are two bullet paths growing

from along the line with slope .• Let and denote the line segments that forward bul-

let path and backward bullet path hit.• If either path does not hit any segment then we

store a special null value.• Each slope is determined by exactly two lines.

Page 43: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

What Happens at Each Event• Possible scenarios

Page 44: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

What Happens at Each Event• Same segment• If and are endpoints of the same segment, then they

are visible, and we add the edge to the visibility graph.• How can I check this?

Page 45: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

What Happens at Each Event• Invisible• Consider the distance

from to .• Compute the contact

point of the bullet path shot from in direction with segment or .• If is longer than , and

are not visible.

Calculate the distance of

𝑝

Calculate the distance of

Page 46: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

What Happens at Each Event• Segment entry• If we are entering the segment, then we set or to this

segment.• can be a visibility edge.

Page 47: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

What Happens at Each Event• Segment exit• The bullet path will need to

shoot out and find the next segment that it hits.• It is available in time.• Since we are sweeping over at

the same time that we are sweeping over .• We know that the bullet exten-

sion from hits . • So, new is same as .

𝑓 (𝑤)

Page 48: Visibility Graph Team 10 NakWon Lee, Dongwoo Kim

Thank YouQ&A