Dijkstra and Fm for Path Planning

Embed Size (px)

Citation preview

  • 8/8/2019 Dijkstra and Fm for Path Planning

    1/5

    DIJKSTRAS AND FAST MARCHING METHOD FOR OPTIMAL

    PATH PLANNING

    RYO TAKEI

    Abstract. The underlying PDE in solving the optimal path planning problem

    is the eikonal equation. Depending on the normed used, solutions to the eikonal

    equation, not surprisingly, differ.

    Introduction

    Optimal path planning is, essentially, a problem in optimal control. Hence, theformulation of the problem as a PDE exploits the dynamic programming principle(DPP):

    V(x0) = infy()

    V(y(t + t)) +

    t+tt

    c(y(s))ds

    ,

    where V is the value function, c the running cost function, and y() the trajectory.With the domain D, we are given T D, a set of targets where V is defined to bezero. The DPP can be made into a PDE by taking t 0:

    minyV(x) y = c(x)

    Under the constraint ||y||p 1 (or any constant), using the dual norm | | | |p, one

    arrives at the Eikonal equation:||V(x)||p = c(x) for x D\T

    V(x) = 0 for x T

    For example, | | | |1 = | | | |, | | | | = | | | |1 and the dual of | | | |2 is itself.

    Dijkstras Algorithm for Networks

    The optimal path problem considered on a (cartesian) grid amounts to solvinga shortest path problem for discrete networks. Hence, the problem may be solvedusing Dijkstras Algorithm: On a discrete grid, set V = 0 at the target set andV = + elsewhere. At each iteration, extract the grid point with the least valueofV, say at xj and update the value ofV(xj) by,

    V(xj) minxkNn(xj)

    {w(xk)c(xj) + V(xk)}

    where Nn(xj) are the neighbouring grid points of xj , and w(xj) are the weightsassociated with each neighbouring grid point. Both Nn and w are dependent on thenormed used for the eikonal equation. The norms with their respective neighboursand weights are shown in figure 1.

    Date: August 11, 2006.

    1

  • 8/8/2019 Dijkstra and Fm for Path Planning

    2/5

    2 RYO TAKEI

    Figure 1. Norms (p) and their respective neighbours Nn andweights w(xj) of the neighbouring points.

    Figure 2. The contour lines ofV computed by Dijktras methodusing norms p = 1, 2 and (clockwise). Grid is size 512 for allcases.

    The contour lines ofV computed by Dijktras method using norms p = 1, 2 and are shown in figure 2. For all cases, the target set T is the origin.

  • 8/8/2019 Dijkstra and Fm for Path Planning

    3/5

    DIJKSTRAS AND FAST MARCHING METHOD FOR OPTIMAL PATH PLANNING 3

    Figure 3. Norms (p) and their respective neighbours Nn and

    weights w(xj) of the neighbouring points. We see that the contourlines becomes circular as it moves away from the origin (the targetT).

    Fast Marching Methods for Eikonal Equations

    Dijkstras method, with the p = 1 stencil, for example, can be written as,

    Vi,j = min{Vi1,j, Vi+1,j, Vi,j1, Vi,j+1}+ ci,j

    which is equivalent to:

    max{DxVij ,D+xVij, D

    yVij,D+yVij} = cij .

    Hence, Dijkstras method with p = 1 is essentially solving the PDE:

    max{|Vx|, |Vy|} = c(x, y)Likewise, for p = 2, Dijktras method is solving the PDE:

    maxu{

    dVdu} = c(x, y)

    where u = (cos , sin ) for = 0, /4, /2, . . . ,7/4.

    The Fast Marching Method (FMM), attempts to solve the underlying PDE,V2x + V

    2y = c(x, y),

    by applying the following discretization in the update step:

    (max{DxVij,D+xVij, 0}

    2 + max{DyVij ,D+yVij , 0}

    2)1/2 = cij

    Solving the above equation for Vij involves a quadratic equation:

    Vij = ( + )/2 + (( )2 + 2c2ij)

    1/2/2,

    where = min{Vi+1,j , Vi1,j} and = min{Vi,j1, Vi,j+1}. For special caseswhen Vi+1,j = Vi1,j = +, we simply have Vij = cij and similarly whenVi,j1 = Vi,j+1 = +, we have Vij = cij .The contour lines for V constructed using FMM is shown in figure 3. We see thatthe contour lines becomes circular as it moves away from the origin (the target T).

  • 8/8/2019 Dijkstra and Fm for Path Planning

    4/5

    4 RYO TAKEI

    Sample Test Cases

    Below are results of running Dijkstras method for p = 2 and the FMM on a

    sample map with a given set of obstacles (where c is set to ). Optimal pathsfrom various initial points are computed by a simple discrete analogue of gradientdescent: simply move to the direction of minimum value in the neighbour points.Initial points for both cases were (0.6,0.8), (0.8, 0.2) and (0.4, 0.8). Resultsare shown in figure 4. The grid size was 81 by 81.Results show better contour lines for FMM, while optimal trajectories computedwere identical. This suggests that crude trajectory computing algorithms can givebad results even with a better value function V. More on this will be studied.Remark: Ian Mitchell, in his paper, used this simple discrete analogue of gradientdescent; why identical trajectories resulted in both Dijkstra and FMM is yet aquestion. Is the V found by FMM (I based mine on Sethians book) different fromthose produced by Mitchell??

    Department of Mathematics, Simon Fraser UniversityE-mail address: [email protected]

  • 8/8/2019 Dijkstra and Fm for Path Planning

    5/5

    DIJKSTRAS AND FAST MARCHING METHOD FOR OPTIMAL PATH PLANNING 5

    Figure 4. The contour lines ofV computed by Dijktras method(p = 2) and FMM for a sample map with obstacles. Optimal

    trajectories are shown from initial points (0.6,0.8), (0.8, 0.2)and (0.4, 0.8).