Skip to main content
. Author manuscript; available in PMC: 2012 Jan 29.
Published in final edited form as: Proc IEEE RAS EMBS Int Conf Biomed Robot Biomechatron. 2010:893–899. doi: 10.1109/BIOROB.2010.5625965

Algorithm 1.

TBUILD_NEEDLE_RRT(qinit,Qgoal)

1: TINITIALIZE_TREE(qinit)
2: while (TQgoal= and k < K) do
3: repeat
4:   prand ← RANDOM_POINT_R3()
5:   Qreach = ∅
6:   for all qiT do
7:    if REACHABLE(prand, qi) then
8:     QreachQreachqi
9:       end if
10:     end for
11: until Qreach = ∅
12: qnear ← NEAREST_NEIGHBOR_R3(prand,Qreach)
13: uSOLVE_PARAMETERS(qnear,prand,T)
14: qnew ← NEW_STATE(qnear, u)
15: if VALID_EDGE(qnear, qnew, u) then
16:     TADD_VERTEX(qnew)
17:     TADD_EDGE(qnear,qnew,u)
18: end if
19: kk + 1
20: end while
21: return T