Skip to main content
. 2020 Jun 5;5(2):26. doi: 10.3390/biomimetics5020026
Algorithm 1 RRT
  Input: Initial and desired configuration of the robot, the maximum number of samples, Nmax
  Output: Tree, T
  •   1.

    Add initial configuration as a node C1 to the tree, T

  •   2.
    For i = 1 to Nmax:
    1. R = Random Coordinate (x, y)
    2. Pick existing configuration Cp of the tree whose Coordinate P is closest to R in the geometric distance.
    3. Calculate (WL, WR) that locomotes the robot from P to R where the geometric distance to R reduces the most to generate a new set of configurations {C}.
    4. Add {C} to tree
    5. Stop if any configuration of {C} is within a tolerable error range for both geometric distance and head orientation.
  •   3.

    Return T