Skip to main content
. 2020 Oct 24;20(21):6060. doi: 10.3390/s20216060
Algorithm 2. Trajectory optimization method.
Input: original path L, C-space, obstacles Ti, start point p, target point q
Output: optimized path Lopt
Lopt=[]
Ltemp=[]
for l=1 to nl do
if l = 1 then
  Lopt.append(GLl)
  starttemp=GLl
  continue
end if
endtemp = GLl
if l=nl then
  Lopt.append(endtemp)
  return Lopt
end if
 check whether the path between starttemp and endtemp intersects with any obstacle Ti
 if intersection then
  Lopt.append(GLl1)
  starttemp=GLl1
else
  continue
end if
end for