static bool comp_ccost(RRTNode *n1, RRTNode *n2);
float update_ccost();
bool visit();
+ /** Return ``true`` if ``n`` is in front of ``this``.
+ *
+ * @param n The node that is beeing checked.
+ */
bool inFront(RRTNode *n);
};
std::vector<RRTNode *> st5(RRTNode *init, RRTNode *goal)
{
- return st5(init, goal, ST5STEP, false);
+ if (init->inFront(goal))
+ return st5(init, goal, ST5STEP, false);
+ return st5(init, goal, ST5STEP, true);
}
std::vector<RRTNode *> st5(RRTNode *init, RRTNode *goal, bool bw)