Skip to main content
. Author manuscript; available in PMC: 2024 Aug 16.
Published in final edited form as: IEEE Robot Autom Lett. 2020 Aug 4;5(4):6427–6434. doi: 10.1109/lra.2020.3013900

Algorithm 1.

Contact Detection

1: procedure ContactDetection ψcntrl,ψe,Cb
2:  wbw-b
3:  repeat
4:   wbwb+Cbψcntr
5:   if ψe>ζψ then
6:    Possible Contact ← true
7:    wc=wb
8:   else
9:    Possible Contact ← false
10:    wc=0
11:   end if
12:   if Possible Contact == true then
13:    if wbx-wcx>ζσ then
14:     if ψcntrlx>0 then
15:      Contact Triggered X+ ← true
16:     else
17:      Contact Triggered X- ← true
18:     end if
19:    end if
20:    if wby-wcy>ζσ then
21:     if ψcntry>0 then
22:      Contact Triggered Y+ ← true
23:     else
24:      Contact Triggered Y- ← true
25:     end if
26:    end if
27:   end if
28:  until Reset == true
29:  return true
30: end procedure