60 moveit_msgs::QueryPlannerInterfaces::Response& res)
62 for (
const auto& planning_pipelines :
context_->moveit_cpp_->getPlanningPipelines())
64 const auto& pipeline_id = planning_pipelines.first;
66 const planning_interface::PlannerManagerPtr& planner_interface =
planning_pipeline->getPlannerManager();
67 if (planner_interface)
69 std::vector<std::string> algs;
70 planner_interface->getPlanningAlgorithms(algs);
71 moveit_msgs::PlannerInterfaceDescription pi_desc;
72 pi_desc.name = planner_interface->getDescription();
73 pi_desc.pipeline_id = pipeline_id;
74 planner_interface->getPlanningAlgorithms(pi_desc.planner_ids);
75 res.planner_interfaces.push_back(pi_desc);
82 moveit_msgs::GetPlannerParams::Response& res)
88 const planning_interface::PlannerManagerPtr& planner_interface =
planning_pipeline->getPlannerManager();
89 if (planner_interface)
91 std::map<std::string, std::string> config;
95 planning_interface::PlannerConfigurationMap::const_iterator it =
96 configs.find(req.planner_config);
97 if (it != configs.end())
98 config.insert(it->second.config.begin(), it->second.config.end());
100 if (!req.group.empty())
102 it = configs.find(req.group +
"[" + req.planner_config +
"]");
103 if (it != configs.end())
104 config.insert(it->second.config.begin(), it->second.config.end());
107 for (
const auto& key_value_pair : config)
109 res.params.keys.push_back(key_value_pair.first);
110 res.params.values.push_back(key_value_pair.second);
117 moveit_msgs::SetPlannerParams::Response& )
119 if (req.params.keys.size() != req.params.values.size())
126 const planning_interface::PlannerManagerPtr& planner_interface =
planning_pipeline->getPlannerManager();
128 if (planner_interface)
131 const std::string config_name = req.group.empty() ? req.planner_config : req.group +
"[" + req.planner_config +
"]";
134 config.
group = req.group;
135 config.
name = config_name;
138 for (
unsigned int i = 0, end = req.params.keys.size(); i < end; ++i)
139 config.
config[req.params.keys[i]] = req.params.values[i];
141 planner_interface->setPlannerConfigurations(configs);