Skip to main content
. 2022 Nov 18;22(22):8948. doi: 10.3390/s22228948
Algorithm A2 processObstalcesOnLocalTarget
Input:local_target=(xrp,yrp), local_costmap, l, Δθ, Δl, Δs, Δϕ
Output:new_local_target
  • 1:

    Get the cost of local target from local_costmapClocal

  • 2:

    ifClocal>0then

  • 3:

        Vdir=(vx,vy)

  • 4:

        θarctanvyvx

  • 5:

        xgtxltlsinθ

  • 6:

        ygtylt+lcosθ

  • 7:

        θgtθ+Δθ

  • 8:

        if Cgt>0 then

  • 9:

            sEuclidean_distance(robot,local_target)

  • 10:

          seti=1

  • 11:

          while ΔθiΔϕ>0 and liΔl>0 and siΔs>0 do

  • 12:

             xasxgt+iΔlcos(π2θ)

  • 13:

             yasygtiΔlsin(π2θ)

  • 14:

             xspxasiΔscosθ

  • 15:

             yspyasiΔssinθ

  • 16:

             θspθ+ΔθiΔϕ

  • 17:

             if Csp==0 then

  • 18:

              return new_local_target=(xsp,ysp,θsp)

  • 19:

             end if

  • 20:

             i=i+1

  • 21:

        end while

  • 22:

      else

  • 23:

         return guided_turning_point=(xgt,ygt,θgt)

  • 24:

       end if

  • 25:

    else

  • 26:

       return local_target=(xlt,ylt,θlt)

  • 27:

     end if