53 return context->solve(res);
61 std::vector<std::size_t>& added_path_index)
65 bool result = adapter.adaptAndPlan(planner,
planning_scene, req, res, added_path_index);
70 catch (std::exception& ex)
73 "Exception caught executing adapter '%s': %s\nSkipping adapter instead.",
74 adapter.getDescription().c_str(), ex.what());
75 added_path_index.clear();
86 std::vector<std::size_t>& added_path_index)
const
91 return callPlannerInterfaceSolve(*planner, scene, req, res);
101 std::vector<std::size_t> dummy;
110 std::vector<std::size_t> dummy;
118 std::vector<std::size_t>& added_path_index)
const
123 added_path_index.clear();
124 return callPlannerInterfaceSolve(*planner,
planning_scene, req, res);
129 std::vector<std::vector<std::size_t> > added_path_index_each(
adapters_.size());
137 return callPlannerInterfaceSolve(planner, scene, req, res);
140 for (
int i =
adapters_.size() - 1; i >= 0; --i)
142 fn = [&adapter = *
adapters_[i], fn, &added_path_index = added_path_index_each[i]](
145 return callAdapter(adapter, fn, scene, req, res, added_path_index);
150 added_path_index.clear();
153 for (
auto added_state_by_each_adapter_it = added_path_index_each.rbegin();
154 added_state_by_each_adapter_it != added_path_index_each.rend(); ++added_state_by_each_adapter_it)
155 for (std::size_t added_index : *added_state_by_each_adapter_it)
157 for (std::size_t& index_in_path : added_path_index)
158 if (added_index <= index_in_path)
160 added_path_index.push_back(added_index);
162 std::sort(added_path_index.begin(), added_path_index.end());