void ompl::geometric::FMT::traceSolutionPathThroughTree(Motion *goalMotion) { std::vector<Motion*> mpath; Motion *solution = goalMotion; // Construct the solution path while (solution != nullptr) { mpath.push_back(solution); solution = solution->getParent(); } // Set the solution path PathGeometric *path = new PathGeometric(si_); int mPathSize = mpath.size(); for (int i = mPathSize - 1 ; i >= 0 ; --i) path->append(mpath[i]->getState()); pdef_->addSolutionPath(base::PathPtr(path), false, -1.0, getName()); }