Skip to main content
. 2022 Nov 18;22(22):8948. doi: 10.3390/s22228948
Algorithm A1 processBackward
Input:Probot: the robot current position; local_path: A local path intercepted from the global path; global_target: the global target
Output:θlocal_target
  • 1:

    DglobalEuclidean_distance(Pglobal_target,Probot)

  • 2:

    Set the reachable distance of the global target Dglobal_near

  • 3:

    ifDglobal>Dglobal_nearthen

  • 4:

        Get the local_target(x,y,θ) from the last point of local_pathlocal_target

  • 5:

        DlocalEuclidean_distance(Plocal_target,Probot)

  • 6:

        Calculate the direction vector between the robot and the local target Vlt

  • 7:

        Calculate the direction vector of the robot Vrobot

  • 8:

        dotproductVlt·Vrobot

  • 9:

        if dotproduct<0 then

  • 10:

          θlocal_targetθlocal_target+π

  • 11:

       else

  • 12:

          θlocal_targetθlocal_target

  • 13:

       end if

  • 14:

    else

  • 15:

       θlocal_targetθglobal_target

  • 16:

    end if