}
pthread_join(rt, NULL);
pthread_join(gt, NULL);
+ if (p.p_root_.goal_found() && p.p_root_.goal()->ccost() < mc) {
+ ron = p.p_root_.goal()->parent();
+ gon = p.p_root_.goal();
+ mc = p.p_root_.goal()->ccost();
+ }
+ if (p.p_goal_.goal_found() && p.p_goal_.goal()->ccost() < mc) {
+ ron = p.p_goal_.goal();
+ gon = p.p_goal_.goal()->parent();
+ mc = p.p_goal_.goal()->ccost();
+ }
// connect trees
while (gon != p.goal()) {
p.p_root_.nodes().push_back(new RRTNode(
}
ron->add_child(p.goal(), p.p_root_.cost(ron, p.goal()));
// end of connect trees
+ p.root()->remove_parent(); // needed if p.p_goal_.goal_found()
if (gf)
p.tlog(p.findt());
if (p.opt_path())