Robot Learning - About Classical Path Planning (2)

8.Roadmap route map

The first set of discretization methods to be studied are called roadmaps, which use a simple connected graph to represent the configuration space—similar to representing a city with a subway map.

The roadmap approach is usually implemented in two phases:

- The construction phase constructs the graph from the continuous representation of the space. This phase usually takes a lot of time and effort, but the resulting graph can be used for multiple queries with minimal modification.

The query phase evaluates the image to find a path from the start location to the goal location. This is done through a search algorithm.

In this discretized section, we only discuss and evaluate the construction phase of each roadmap approach. While the query phase will be discussed in more detail in the graph search section following the discretization section.

The next two roadmap methods that you will learn about are the Visibility diagram and the Voronoi diagram method.

9. Visibility diagram

The visibility graph builds the roadmap by interconnecting start nodes, vertices of all obstacles, and goal nodes (except those nodes that cause collisions with obstacles). The visibility graph is called that for a reason - it connects each node to all other nodes that are "visible" from its position.

— Nodes: start point, goal and all obstacle vertices.

— Edge: The edge between two nodes that does not intersect with obstacles, including obstacle edges.

The figure below shows the visibility map for a configuration space containing polygonal obstacles.

The motivation for constructing the visibility graph is that the shortest path from a start node to a goal node will be a piecewise linear path, bent only at the vertices of obstacles. This makes intuitive sense - the path should fit as close as possible to the corner of the obstacle without adding any extra length.

Once the visibility graph is constructed, a search algorithm can be applied to find the shortest path from the origin to the goal. The figure below shows the shortest path in the visibility graph.

small test:

Although the algorithm for searching the roadmap has not been introduced, it is still worth analyzing whether any algorithm can find the path from the start to the goal, and whether the optimal path is within the roadmap.

With the testing done, you should now have seen the benefits of the visibility graph approach. A disadvantage of visibility graphs is that they leave no room for error. A robot traversing the optimal path must be very close to obstacles, which greatly increases the risk of collisions. In some applications, such as animation or path planning for video games, this is acceptable. However, the uncertainty in real-world robot localization makes this approach impractical.

10. Voronoi (Tyson polygon method) diagram

Another discretization method for generating road maps is called a Voronoi diagram. Unlike the visibility map method, which generates the shortest paths, the Voronoi diagram maximizes the gaps between obstacles. A Voronoi diagram is a diagram whose edges bisect the free space between obstacles. Each edge is equidistant from surrounding obstacles - allowing the largest possible clearance. The following figure shows the Voronoi diagram of the configuration space:

 

11. Unit decomposition method

Another discretization method that can be used to convert a configuration space into a representation that can be easily explored by a search algorithm is cell decomposition. Cell decomposition divides the space into discrete cells, each cell is a node, and adjacent cells are connected by edges. There are two different types of cell decomposition:

  • exact cell breakdown

  • approximate cell decomposition

exact cell breakdown

Exact cell decomposition divides space into non-overlapping grids. This is usually achieved by partitioning the space into triangles and trapezoids, which can be achieved by adding vertical line segments at the vertices of each obstacle. See the result of an exact cell decomposition of the configuration space in the image below:

 Once the space is decomposed, the resulting graph can be used to search for the shortest path from the origin to the goal. The resulting graph is shown below:

Precise Cell Decomposition is elegant because of its precision and completeness. Each cell is either "full", meaning it is completely occupied by obstacles, or "empty", meaning it is free. The union of all cells exactly represents the configuration space. If there is a path from the start point to the end point, the resulting graph will include it.

To achieve accurate cell decomposition, the algorithm must sort all obstacle vertices along the x-axis, and then determine for each vertex whether a new cell must be created, or whether two cells should be merged together. This algorithm is called the planar scan algorithm.

Precise cell decomposition leads to weird cell shapes. Collections of uniquely shaped trapezoids and triangles are more difficult to work with than regular grids of rectangles. This leads to an increase in computational complexity, especially for environments with more dimensions. Decomposition calculations are also difficult when obstacles are not polygonal but irregular in shape.

For this reason, another type of cell decomposition exists, which is more practical to implement.

12. Approximate Cell Decomposition

Approximate cell decomposition partitions the configuration space into discrete cells of simple, regular shape—such as rectangles and squares (or their multidimensional equivalents). In addition to simplifying calculations for cells, this method supports hierarchical decomposition of spaces (more on this below).

simple decomposition

The two-dimensional configuration space can be decomposed into a grid of rectangular cells. Each cell can then be marked as full or empty as before. The search algorithm can then look for a sequence of free cells to connect the start node to the target node.

This method is more efficient than precise cell disassembly, but it loses its integrity. A particular configuration space may contain a feasible path, but due to obstacles, the resolution of the cells causes some cells containing the path to be marked as "full". A cell is marked as "full" regardless of whether 99% of its space is occupied by obstacles, or only 1% of its space is occupied by obstacles. Obviously, this is not true.

iterative decomposition

There is also a way to divide the space into simple cells. Instead of immediately decomposing the space into small units of equal size, the method recursively decomposes the space into four quadrants. Each quadrant is marked as full, empty, or a new label called "mixed" - used to represent some cells that are occupied by obstacles but also contain some free space. If a cell with free space cannot be found from the beginning to the end, the mixed cell will be further broken down into four additional quadrants. Through this process, more free cells will appear, eventually revealing a path (if one exists). A two-dimensional implementation of this approach is called quadtree decomposition. This can be seen in the diagram below:

algorithm

The algorithm behind approximate cell decomposition is much simpler than the exact cell decomposition algorithm. Pseudocode for this algorithm is provided below:

 

The three-dimensional equivalent of a quadtree is an octree, as shown in the figure below. The method of discretizing a space with an arbitrary number of dimensions follows the same procedure as the algorithm described above, but is extended to accommodate additional dimensions.

 

Although exact cell decomposition is a more elegant approach, it is much more computationally expensive than approximate cell decomposition for non-trivial environments. Therefore, an approximate cell decomposition method is usually used in practice. After enough calculations, the approximate cell decomposition is close to complete. However, this is not optimal - the final path depends on how the cells are broken down.

Approximate cell decompositions can quickly find obvious solutions. The optimal path might squeeze through a tiny opening between obstacles, but the final path takes a longer route through the vast open space -- which is what the recursive decomposition algorithm finds first. Approximate cell decomposition is functional, but like all discrete/combinatorial path planning methods, it starts to be computationally intractable in high-dimensional environments.

13. Potential Field

The last discretization method to be studied in this article is the potential field method. Unlike the methods discussed so far that discretize a continuous space into a connected graph, potential field methods perform a different type of discretization.

To accomplish its task, the potential field method generates two functions—one that attracts the robot to the goal, and one that repels the robot away from obstacles. These two functions can be added to create a discretized representation. By applying optimization algorithms such as gradient descent, the robot can move towards the target space while avoiding obstacles. Let's see in more detail how these steps are implemented.

attractive potential field

The attractive potential field is a function with a global minimum under the target configuration. If a robot is placed at an arbitrary point and asked to follow the direction of steepest descent, it will eventually reach the target configuration. This function doesn't need to be complicated, a simple quadratic function can achieve all the requirements discussed above.

repulsive potential field

The repulsive potential field is a function equal to zero in free space and grows to a larger value near obstacles. One way to create such a potential field is to use the function below.

The value ρ0 controls the non-zero distance of the potential field from the obstacle, and how steep the area around the obstacle is. When ρ0 is exceeded, the potential field is zero. Within the range of ρ0 from the obstacle, the potential field is proportional to the distance from the obstacle.

Potential field and

Adding the attractive and repulsive functions yields the potential field used to guide the robot from anywhere in space to the goal. The figure below shows the sum of the functions, and the following figure shows the final function.

 

Imagine placing a marble on the surface of a function - it will roll in the direction of the goal from anywhere on the field without colliding with any obstacles (as long as ρ0 is set properly)!

The gradient of the function determines the direction the robot should move, and the velocity can be set to be constant, or scaled according to the distance between the robot and the target.

potential field problem

The potential field method is not without its drawbacks, it is neither complete nor optimal. In some environments, this method will guide the robot to a local minimum rather than a global minimum. The image below depicts such an example. Depending on where the bot starts, it may be directed to the bottom of the smile map. The figure below describes the configuration space, and the figure below shows the corresponding potential field.

 

The problem of the robot getting stuck in a local minimum can be solved by adding random walks and other strategies commonly applied to gradient descent, but ultimately the approach is not complete.

The potential field method is also not optimal because it may not always find the shortest (or cheapest) path from the origin to the goal. The shortest road is not necessarily the steepest downhill. Furthermore, the potential field does not take into account the cost of each step.

This article summarizes the following diagram:

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/jeffliu123/article/details/129966665