|
Robot Motion Planning—Home Work 3
Q) For a two-dimensional configuration space, implement the attractive/repulsive potential function of your choice.
Movies:(not the ones corresponding to the figures displayed above)
Note: Right-click and “Save As” if you have a problem directly viewing them
My Implementation is as follows:
· The user can choose the number and shape of the polygonal obstacles by typing in the number of obstacles at the prompt and by clicking on the figure window to select the vertices of the obstacles. · The user then selects the start and goal points. · The space is split into 100 x 100 identical grids. · Every grid has a potential function value. The potential function value (Utot) has two components, attractive potential Uatt and repulsive potential Urep, given by Utot = Uatt + Urep . · Attractive Potential function that I have chosen is the conical potential given by: Uatt (q) = k*d(q,qgoal), where ‘k’ is the scaling factor and ‘d’ is the distance function between the current position and the goal position. I have chosen Euclidean distance as the distance function and I have used k=1. · Repulsive Potential function is given by: Urep (q) = (1/2) * m * (1/D(q) - 1/Q’)2 for D(q) <= Q’ and Urep (q) = 0 for D(q) > Q’ where ‘m’ is the scaling factor, ‘D’ is the distance function between the current position and the nearest boundary point on the obstacle and Q’ is the cut-off distance for the repulsive potential function. I chose m=2, Q’=0.2 (on a scale of 10) and the distance function as the Euclidean distance. · Now that the Total Potential Function has been evaluated for all the grids, the implementation performs gradient descent to move. 8-point connectivity has been used in this case. · The implementations checks for goal reach and also for the local minimum. When it reaches the goal, it terminates displaying “Success” and when it reaches a local minimum (which isn't the goal), it terminates displaying “Failure”. · As you can see in the figures above, the darker regions represent those which are near the goal and away from the obstacles, while the lighter regions are either away from the goal or near the obstacles or both.
I chose this potential function algorithm as I found it as the basic platform on which all potential function algorithms are built. |
