Cell Decomposition Course: Introduction to Autonomous Mobile Robotics Prof. Jaebyung Park Intelligent Systems & Robotics Lab. Division of Electronic Engineering Chonbuk National Univerisity Presented by: Ram Kaji Budhathoki Student ID: 201155431 Ansu Man Singh Student ID:201150875 Outline • • • • • Exact Cell Decomposition Trapezoidal Decomposition Boustrophedon Decomposition Morse Decomposition Visibility based Decomposition Exact Cell Decomposition • Definition – Free space is the union of simple sub spaces called cell – If two cell shares common boundary, then they are called adjacent cell Adjacent cells Exact Cell Decomposition • Adjacency graph – A graph where a node represent cell, and an edge is used to connect two nodes Path planning using cell decomposition • Steps – First cells containing start and goal points are determined. – Nodes connecting initial nodes and goal nodes is searched using adjacency graph – Path in each cell is determined Path planning using cell decomposition Node with grey color represent cell covered during the path of robot Adjacency graph start Cell goal Cell Decomposition method • • • • Trapezoidal decomposition Boustrophedon decomposition Morse cell decomposition Visibility based decomposition Trapezoidal Decomposition • Shape of the cells after decomposition is trapezoidal • Cell can also be triangular in shape • For the trapezoidal decomposition obstacles should be in polygon Trapezoidal Decomposition • The trapezoidal decomposition is formed by extending a vertical line at each vertex up, down, or both ways until it intersects an obstacle boundary Trapezoidal Decomposition Formation of cells after Trapezoidal decomposition Steps in Trapezoidal decomposition 1. In order to decompose, First list of polygons with the list of vertices are given as input to the algorithms 2. Sort all the vertices according to the value of X-coordinate of each vertex. This steps require O(n*log(n)) time and O(n) memory 3. Determination of intersection of those vertices with edges. This requires O(n^2) time Trapezoidal Decomposition • However computational time in step3 can be reduced if we use sweeping line and maintain an efficient list. • The list should contain the edges that will intersect with line extended from current vertex • When a sweeping line touches a vertex it is called Event Trapezoidal Decomposition • Some Terminology Vertex where event took place Scan line Y – coordinates of e(upper) is always greater that e(lower) Trapezoidal Decomposition • There are four types of event Trapezoidal Decomposition Trapezoidal Decomposition • Example Trapezoidal Decomposition • Example Trapezoidal Decomposition • Example Trapezoidal Decomposition • Example Trapezoidal Decomposition • This method requires total O(nlog(n)) time maintaining the list • By the help of this we can determine the intersection point of the vertices with boundary of other obstacle Path planning using Trapezoidal decomposition • Steps 1. First cells containing start and goal points are determined. 2. Adjacency graph is created with node is used to represent a cell, 3. Path is searched on adjacency graph, i.e, nodes connecting start point to goal point is searched Path planning using Trapezoidal decomposition • Examples Mid point Adjacency graph Path planning for coverage application • Coverage application includes autonomous lawn mowing, floor cleaning and snow removal • This type of application requires robot to move through each and every points on free spaces • Performance is measured in terms of area covered vs path length. • For this type of application cell Decomposition is very essential. Boustrophedon Decomposition • Boustrophedon Decomposition is similar to Trapezoidal decomposition, however in Boustrophedon vertical lines are formed both upward and down ward of vertex. Cell decomposition using Boustrophedon decomposition Boustrophedon Decomposition Boustrophedon decomposition Trapezoidal decomposition This figure proves that when there are more Number cells, then robot have to cover more Distance. Coverage using Boustrophedon Decomposition • Steps in the coverage using Boustrophedon Decomposition – Step1: Decomposition of free space into cells – Step2: Creation of Adjacency graph – Step3: Visit of each node in the graph, known as exhaustive walk – Step4 : at each node, cell is covered using back and forth motions Coverage using Boustrophedon Decomposition Step 1 Step 2 and 3 Step 4 Boustrophedon Decomposition • Exhaustive Walk along the graph can be achieved using depth-first search algorithm Depth-First search Algorithm(DFS) • In this algorithms Each node is given 3 states. – Node that is not visited – Node that is in progress or process – Node where processing is finished Let the three states be defined by three colors (grey, white and black) Depth-First search Algorithm(DFS) • Initially all nodes are white Depth-First search Algorithm(DFS) • Start with node one, i.e. visit node 1 Depth-First search Algorithm(DFS) • Node one has connection with node 4, so visit node 4 Depth-First search Algorithm(DFS) • Node 4 has connection with node 2 and 5 , choose one node and visit that node, e.g 2 Depth-First search Algorithm(DFS) • Node 2 has connection with node 4 and5 , since 4 is already visited, Node 5 Depth-First search Algorithm(DFS) • Similarly visit node 3 Depth-First search Algorithm(DFS) • Since no new node are connected with node 3, so mark node 3 with black color, i.e. processing finished status Depth-First search Algorithm(DFS) • Now node has connection with 5, since 5 is already visited, Mark Node 5 with black color Depth-First search Algorithm(DFS) • Similarly, same applies to node 2 Depth-First search Algorithm(DFS) • same applies to node 4 and 1 Coverage using Boustrophedon Decomposition • Example Obstacles Robot Visibility based Decomposition • Visibility based decomposition is based on line of sight • This decomposition is used for pursuit/evasion problem • Let there is one evader(bad guy) and many pursuers (police) • The evader is caught in a space, if both evader and pursuer lies in line of sight, i.e. Visibility based decomposition • Some Terminology – H(Wfree):Number of pursuer required to capture an evader at a given time – Contaminated space: Region in workspace where there may be evader – Clear space: Region in free space where there are no evader – Re-contaminated space : Region that may be recontaminated – Edge gap: edge of the visible polygon on free space Visibility based decomposition • Example Each edge graph contains binary information, B(x) is the binary vector related to x Edge gap Visibility based decomposition • In visibility based decomposition cells are decomposed by the help of conservative region. • Adjacency graph is created for all cells • Binary information is stored in each node of Adjacency graph Visibility based decomposition • Conservative region is created by following ways: – Lines are extended from convex vertex until they intersect other walls – If two vertex are in line of sight, rays are extended from each vertex to other vertex. – E.g. Visibility based decomposition • Example Conservative region with adjacency graph Visibility based algorithms to solve pursuit/evasion problem • Construction of Adjacency graph and conservative region is not enough to solve pursuit evasion problem • For that Information graph is required Visibility based algorithms to solve pursuit/evasion problem • Information graph: In this graph all possible binary information of edge-gap is stored for cell. Which actually becomes the nodes of information graph Visibility based algorithms to solve pursuit/evasion problem • Example Adjacency graph with visible edge-gap Visibility based algorithms to solve pursuit/evasion problem • Example 1 0 1 0 00 1 0 0 10 01 11 Information graph 1 Visibility based algorithms to solve pursuit/evasion problem • Example 1 0 1 0 00 1 0 0 10 01 11 1 Searching: Start with any node with all 1 and stop at any node with all 0 Complexity • In order to find the evader in simply connected spaces with n edge,O(log(n)) pursuers are required, • In order to find evader in spaces with ‘h’ holes O(sqrt(h)+log(n)) pursuers are required Morse Cell Decompositions Drawbacks of Trapezoidal Decomposition • Simple back-and-forth motions. No efficient paths for coverage. • Cells formed can be aggregated with neighboring cells to form more efficient coverage paths. • A polygonal workspace is required, not realistic for every applications. Morse Function • Cells have simple structure and can be defined in nonpolygonal spaces. • Critical points are nondegenerate i.e. critical points are isolated. • The boustrophedon decomposition is a Morse decomposition. Morse Decomposition Definition • A slice is a codimension one manifold denoted by Q . • The slices are parameterized by λ (varying λ sweeps a slice through the space). • The portion of the slice in the free configuration space,Q free , is denoted by Q free , i.e. Q free Q Q free • The connectivity changes that occur at critical points are used to define cells in a cell decomposition. • Q free changes connectivity at critical points. Slices that contain critical points are termed critical slices. • Qj is the jth open connected slice interval such that free Q free j Q j free Morse Decomposition Definition Contd…. It is an exact cell decomposition whose cells are the connected components of Qfree\I*. I * Is the slice intervals that contain a critical point. Consider the boustrophedon decomposition of a nonpolygonal environment. • As a straight line slice is swept from left to right, its connectivity in the free space changes first from one to two, then two to one and so forth. • At the points where connectivity changes occur, the cell boundaries in the free Space are located. Morse Decomposition in terms of Critical Points ∇h ∇m • Slice function: h(x,y)= x • At a critical point x of h |M , ∇ h ( x ) =∇m ( x ) Connectedness Connectivity of the slice in the free space changes at the critical points. 1- Connected 1-Connected 2 -Connected 2 -Connected Robot Motion and Reeb Graph Each cell can be covered by back and forth motions Reeb graph represents the topology of the cellular decomposition Examples of Morse Decomposition • The slice may be defined as the preimage of a general realvalued function h : Q R . • Varying the function that defines the shape of the slice that results in different decompositions. • For the boustrophedon decomposition in the plane, h(x, y) = x. Morse Decomposition 1. h(x ,y)= x y 2 2 Fig. Cell Decomposition for h(x,y)= x 2 y 2 and its associated spiral coverage pattern. • The slices are the circles that are the preimages of h. • At the critical points, the circle-shaped slices become tangent to the obstacles. • The robot follows a spiral pattern until it encounters critical points. • It maximizes the area covered per unit distance travelled in regions sparsely populated with obstacles. 2. h(x, y)= Morse Decomposition y tan x y Fig. Decomposition for h(x, y)= tan x and a spiked pattern. • The free space is sliced like a pie. • At critical points, the slices are tangent to the obstacles. • This type of pattern covers densely the region closest to the centre of the pattern. Morse Decomposition 3. h(x, y) = |x| + |y| Fig. Decomposition for h(x ,y) = |x| + |y| and a coverage pattern. • Squares are the slices. • At the critical points the corner of a square touches an obstacle or the side of it becomes tangent to an obstacle. • This pattern can be used to to approximate the spiral pattern as it is easier to move the robots along the straight line rather than circles. Brushfire Decomposition • Imaginary wave fronts emanate from each obstacle and collide at points on the GVD. • The decomposition models the topology of the wave fronts as they initially collide with each other and form or destroy new wave fronts. • The wave fronts collide with each other at the points located on the GVD. Fig. GVD of an environment Brushfire Decompostion Fig. Incremental construction of the cells of the brushfire decomposition. Brushfire Decomposition Coverage Path Fig. Coverage pattern for the brushfire decomposition • To generate this pattern, the robot follows the boundaries of obstacles. • It has a continuous robust reference for localization. • The robot relies heavily on long-range sensors. Wave-Front Decompostion • Let h(x, y) be the length of the shortest path between a point (x, y) and a fixed location. • The level sets h−1(λ) foliate the free space where for a given λ. • Wave front starts at qstart and expanding into the free space. • The value λ parameterizes each wave front (or level set of h). Once the wave front crosses qgoal, the planner can backtrack a path from qgoal to qstart . • The shortest path-length function induces a cell decomposition, as well. • Critical points of this function occur when wave fronts becomes tangent to obstacles and when wave fronts collide. • Once the waves collide, they propagate as one wave with a nonsmooth point that originated at the critical point. Wave-Front Decomposition • The non smooth point traces the set of points of equal path length to the goal for two classes of paths, one to the right of the obstacle and one to the left. • This decomposition is especially useful for coverage by a tethered robot Fig. Wave-front decomposition defined on a continuous domain. • The wave front emanates from a point in the lower-left portion of the figure. Sensor Based Coverage • If the the robot is placed in an unknown environment, but assume it has the standard range sensor ring. • The task is to simultaneously cover and explore the unknown space. • This can be reduced to concurrently and incrementally covering each cell while constructing the adjacency graph. • For sensor-based coverage, a Reeb graph is constructed . • This Reeb graph is dual i.e. the nodes of the graph are the critical points and the edges connect neighboring critical points, i.e., correspond to cells. . Sensor Based Coverage (Detect Critical Points) Fig. A boustrophedon decomposition and its Reeb graph. At the critical points, the surface normals and sweep direction are parallel. Sensor Based Coverage Fig. Incremental construction of the graph while the robot is covering the space. While covering the space, look for critical points Algorithm • Cover a cell until the closing critical point is detected • If the closing critical point has “uncleaned” cells associated with it, chose one and cover, repeat • If the closing critical point has no uncleaned cells, – search reeb graph for a critical point with an uncleaned cell – Plan a path to critical point – Cover cell, repeat • Else coverage is complete Sensing Critical Points • How does the robot sense a critical point? The robot looks for points where the surface normals are parallel to the sweep direction. • How does the robot find all of the critical points? While covering the cell, the robot looks for the other critical point that indicates complete coverage of the cell and the next node in the Reeb graph called the closing critical point. It is to be guaranted for the Reeb Graph that the robot finds the closing critical point of each cell. The robot perform boundary-following along the ceiling in the reverse direction so that it will sense the critical points related to the ceiling. This motion is reverse boundary following. Missing Closing Critical Point Fig. Critical Points in the ceiling are missed with conventional coverage algorithms The algorithm uses a raster scan type of motion: move along a slice or lap to an obstacle, follow the obstacle boundary for a lateral distance equal to interlap spacing, and repeat. • This alternates boundary-following between the "ceiling" and "floor" of the cell. • It can miss the closing critical point of a cell. • The robot did not follow the boundary of the ceiling, it cannot sense the critical points in the ceiling using the critical point sensing method. Cycle Algorithm Forward phase: The robot first follows the path between points Si and 2. Reverse phase: It follows the path between points 2 and 3. Closing phase: The robot follows the path between points 3 and Si. • This algorithm is the most important part of the incremental construction. • It guarantees encountering the closing critical point of a cell if it exists between subsequent laps. Complexity of Coverage 1. Establish a relationship among the number of critical points, cells, and obstacles. 2. Determine an upper-bound on path length given the perimeter the obstacles and the diameter Δ smallest disk that circumscribes the space as shown in Fig below. Consider coverage with the boustrophedon decomposition. In the Reeb graph Obstacles including the outer boundary are represented with "faces" in the graph .Euler's formula relate s the number of nodes ν, edges e and faces f of a planar connected graph by v- e + f =2------------(1) Fig. To determine the complexity of the algorithm in terms of the environment size , the diameter Δ of the "minimal" disk that fully contains the space. Modified Euler's Formula • In general ,the outer boundary of the space is not termed an obstacle, 1 is subtracted from the number of faces to get the number of obstacles. • Let Ncp be the number of critical points, Nce be the number of cells and Nob be the number of obstacles . Then from equation (1) Nce=Ncp+Nob-1.------------------(2) Example: There are 21 critical points (nodes in the graph).i.e , Ncp = 21, and two obstacles (faces f2, f3 in the graph; f1 is the outer boundary), Nob = 2. Using the modified Euler's formula Nce = Ncp + Nob − 1, we get , Nce = 22. Therefore, the number of cells increases linearly as the robot discovers new critical points. Extra Lap • • • • • • Analyzing lapping, boundary following and backtracking motions separately. The space is fully contained within a Δ diameter disk, the length of each lapping path can be at most Δ. There must be at least lapping paths where 2r is the interlap spacing. 2r There is an additional lap associated with starting the coverage operation within a cell as shown in Fig. below. The maximum number of lapping paths is 2 r N ce . The length of each lapping path is bounded above by Δ, the total path length of the lapping motions is bounded above by N ------------------(A) 2r ce Fig. When the robot starts to cover a new cell, it performs an "extra" lap starting from a critical point on one of its boundaries. • • • • • Length of Boundary Following Path P :Length of the floor and ceiling of a cell. cell The length of boundary-following paths in a cell is at least Pcell. Considering an undo-reverse boundary-following motion to get to the start point, the lower bound is 1. 5Pcell. In the worst case, the upper bound becomes 2Pcell as shown in Fig. below. The total length of the boundary-following paths is less than 2Ptotal ------(B) where Ptotal is the length of the perimeter of all of the obstacles and the outer boundary. Fig. The total perimeter of the cell is x + y ; y is the length of the floor and x is the length of the ceiling and x >> y. The total path length traveled along the boundary of the cell is bounded above by 2x + y. As x >> y, this value is equal to 2(x + y). Backtracking to Closing Critical Point In the worst case, the length of this backtracking path is Pcell + Δ (where the robot follows every boundary and the longest slice). When we consider all the backtracking paths, the upper bound becomes Ptotal + ΔNce. -……………………………..(C) The extra boundary-following path followed by the robot to discover the critical point is bounded above by Pcell. Hence, the total extra boundary-following path length is bounded above by Ptotal……………………………(D) Fig. After discovering the closing critical point of a cell, the robot backtracks to the closing critical point of a cell with uncovered cells by boundary-following and (if necessary) lapping . DFS on Reeb Graph When the robot finishes covering a cell, it performs a depth-first search on the Reeb graph to choose an uncovered cell (if any are left). Figure 6.29: The robot starts to cover the space from Cp1. Whenever the robot finishes covering a cell, a depth-first search is performed on the graph to choose a new cell to cover. Since we perform a depth-first search on the graph, each cell is traversed at most once , and therefore the backtracking path length is bounded by . N ce Pc e l l i 2 N ce i 1 o r , Pt o t a l 2 N ce ---------------------------------(E) Length of Coverage Path Fig. After finishing covering cells A and B, the robot needs to travel from Cp1 to Cp2 to start to cover cell C. The robot simply follows the boundary of the obstacle either along the ceiling or floor of the cell. In the worst case, the boundary-following path length is bounded above by the length of the perimeter of the obstacles that form the boundary of the cell. Length of Coverage Path Contd…. Combining the above upper bounds, the length of the coverage path is less than 2 4 N ce 5 Ptotal 2r Using Modified Eulers Formula, 2 2r 4 ( N cp N ob ) 5 Ptotal 4 Therefore, the total coverage path length is bounded linearly by the area of the space, the number of critical points, and the length of the perimeter of the obstacles and the outer boundary.