|
Algorithm 3 APF method implementation procedure. |
|
Input: Scene map , random start position , random destination position , positions set . |
|
Output: A path between and . |
| 1: initialization: Set current position , gray processing and binarization for the map . |
| 2: Confirm the location of obstacles and calculate potential energy of each position. |
| 3: while
do
|
| 4: Record current position into . |
| 5: Find the position with the smallest potential energy among the eight positions around . |
| 6: Perform . |
| 7: end while
|
| 8: return A path with all positions in . |