Skip to main content
. 2022 Jul 22;22(15):5478. doi: 10.3390/s22155478
Algorithm 1 Find a non-collision velocity command at sampling-index k+1 (change yaw only)
  • 1:

    The current sampling-index is k;

  • 2:

    forv0=A, v0=v0+BN, while v0A+Bdo

  • 3:

       VcI=R(ψ(k),θ(k))v0u;

  • 4:

       if col(VcI, objectSet)==0; then

  • 5:

         Return VcI as the velocity command, and this algorithm is finished;

  • 6:

       end if

  • 7:

       for ψ0=αdt, ψ0=ψ0+αdtN, while ψ0<αdt do

  • 8:

         VcI=R(ψ(k),θ(k))R(ψ0)v0u;

  • 9:

         if col(VcI, objectSet)==0; then

  • 10:

            Return VcI as the velocity command, and this algorithm is finished;

  • 11:

         end if

  • 12:

         VcI=R(ψ(k),θ(k))R(ψ0)v0u;

  • 13:

         if col(VcI, objectSet)==0; then

  • 14:

            Return VcI as the velocity command, and this algorithm is finished;

  • 15:

         end if

  • 16:

       end for

  • 17:

    end for

  • 18:

    Run Algorithm 2 (change both yaw and pitch);