planning_context_manager.cpp
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2012, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Ioan Sucan */
36 
40 #include <utility>
41 
42 // OMPL version
43 #include <ompl/config.h>
44 
45 #include <ompl/geometric/planners/AnytimePathShortening.h>
46 #include <ompl/geometric/planners/rrt/RRT.h>
47 #include <ompl/geometric/planners/rrt/pRRT.h>
48 #include <ompl/geometric/planners/rrt/RRTConnect.h>
49 #include <ompl/geometric/planners/rrt/TRRT.h>
50 #include <ompl/geometric/planners/rrt/LazyRRT.h>
51 #include <ompl/geometric/planners/est/EST.h>
52 #include <ompl/geometric/planners/sbl/SBL.h>
53 #include <ompl/geometric/planners/sbl/pSBL.h>
54 #include <ompl/geometric/planners/kpiece/KPIECE1.h>
55 #include <ompl/geometric/planners/kpiece/BKPIECE1.h>
56 #include <ompl/geometric/planners/kpiece/LBKPIECE1.h>
57 #include <ompl/geometric/planners/rrt/RRTstar.h>
58 #include <ompl/geometric/planners/prm/PRM.h>
59 #include <ompl/geometric/planners/prm/PRMstar.h>
60 #include <ompl/geometric/planners/fmt/FMT.h>
61 #include <ompl/geometric/planners/fmt/BFMT.h>
62 #include <ompl/geometric/planners/pdst/PDST.h>
63 #include <ompl/geometric/planners/stride/STRIDE.h>
64 #include <ompl/geometric/planners/rrt/BiTRRT.h>
65 #include <ompl/geometric/planners/rrt/LBTRRT.h>
66 #include <ompl/geometric/planners/est/BiEST.h>
67 #include <ompl/geometric/planners/est/ProjEST.h>
68 #include <ompl/geometric/planners/prm/LazyPRM.h>
69 #include <ompl/geometric/planners/prm/LazyPRMstar.h>
70 #include <ompl/geometric/planners/prm/SPARS.h>
71 #include <ompl/geometric/planners/prm/SPARStwo.h>
72 #include <ompl/geometric/planners/informedtrees/AITstar.h>
73 #include <ompl/geometric/planners/informedtrees/ABITstar.h>
74 #include <ompl/geometric/planners/informedtrees/BITstar.h>
75 
79 
80 using namespace std::placeholders;
81 
82 namespace ompl_interface
83 {
84 constexpr char LOGNAME[] = "planning_context_manager";
85 
87 {
88  std::map<std::pair<std::string, std::string>, std::vector<ModelBasedPlanningContextPtr> > contexts_;
89  std::mutex lock_;
90 };
91 
92 } // namespace ompl_interface
93 
95 {
96  // Store all planner data
97  for (const auto& entry : planner_data_storage_paths_)
98  {
99  ROS_INFO("Storing planner data");
100  ob::PlannerData data(planners_[entry.first]->getSpaceInformation());
101  planners_[entry.first]->getPlannerData(data);
102  storage_.store(data, entry.second.c_str());
103  }
104 }
105 
106 template <typename T>
108  const ob::SpaceInformationPtr& si, const std::string& new_name, const ModelBasedPlanningContextSpecification& spec)
109 {
110  // Store planner instance if multi-query planning is enabled
111  auto cfg = spec.config_;
112  auto it = cfg.find("multi_query_planning_enabled");
113  bool multi_query_planning_enabled = false;
114  if (it != cfg.end())
115  {
116  multi_query_planning_enabled = boost::lexical_cast<bool>(it->second);
117  cfg.erase(it);
118  }
119  if (multi_query_planning_enabled)
120  {
121  // If we already have an instance, use that one
122  auto planner_map_it = planners_.find(new_name);
123  if (planner_map_it != planners_.end())
124  return planner_map_it->second;
125 
126  // Certain multi-query planners allow loading and storing the generated planner data. This feature can be
127  // selectively enabled for loading and storing using the bool parameters 'load_planner_data' and
128  // 'store_planner_data'. The storage file path is set using the parameter 'planner_data_path'.
129  // File read and write access are handled by the PlannerDataStorage class. If the file path is invalid
130  // an error message is printed and the planner is constructed/destructed with default values.
131  it = cfg.find("load_planner_data");
132  bool load_planner_data = false;
133  if (it != cfg.end())
134  {
135  load_planner_data = boost::lexical_cast<bool>(it->second);
136  cfg.erase(it);
137  }
138  it = cfg.find("store_planner_data");
139  bool store_planner_data = false;
140  if (it != cfg.end())
141  {
142  store_planner_data = boost::lexical_cast<bool>(it->second);
143  cfg.erase(it);
144  }
145  it = cfg.find("planner_data_path");
146  std::string planner_data_path;
147  if (it != cfg.end())
148  {
149  planner_data_path = it->second;
150  cfg.erase(it);
151  }
152  // Store planner instance for multi-query use
153  planners_[new_name] =
154  allocatePlannerImpl<T>(si, new_name, spec, load_planner_data, store_planner_data, planner_data_path);
155  return planners_[new_name];
156  }
157  else
158  {
159  // Return single-shot planner instance
160  return allocatePlannerImpl<T>(si, new_name, spec);
161  }
162 }
163 
164 template <typename T>
166  const ob::SpaceInformationPtr& si, const std::string& new_name, const ModelBasedPlanningContextSpecification& spec,
167  bool load_planner_data, bool store_planner_data, const std::string& file_path)
168 {
169  ob::PlannerPtr planner;
170  // Try to initialize planner with loaded planner data
171  if (load_planner_data)
172  {
173  ROS_INFO("Loading planner data");
174  ob::PlannerData data(si);
175  storage_.load(file_path.c_str(), data);
176  planner = std::shared_ptr<ob::Planner>{ allocatePersistentPlanner<T>(data) };
177  if (!planner)
179  "Creating a '%s' planner from persistent data is not supported. Going to create a new instance.",
180  new_name.c_str());
181  }
182  if (!planner)
183  planner = std::make_shared<T>(si);
184  if (!new_name.empty())
185  planner->setName(new_name);
186  planner->params().setParams(spec.config_, true);
187  // Remember which planner instances to store when the destructor is called
188  if (store_planner_data)
189  planner_data_storage_paths_[new_name] = file_path;
190  return planner;
191 }
192 
193 // default implementation
194 template <typename T>
195 inline ompl::base::Planner*
197 {
198  return nullptr;
199 };
200 // namespace is scoped instead of global because of GCC bug 56480
201 namespace ompl_interface
202 {
203 template <>
204 inline ompl::base::Planner*
205 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::PRM>(const ob::PlannerData& data)
206 {
207  return new og::PRM(data);
208 };
209 template <>
210 inline ompl::base::Planner*
211 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::PRMstar>(const ob::PlannerData& data)
212 {
213  return new og::PRMstar(data);
214 };
215 template <>
216 inline ompl::base::Planner*
217 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::LazyPRM>(const ob::PlannerData& data)
218 {
219  return new og::LazyPRM(data);
220 };
221 template <>
222 inline ompl::base::Planner*
223 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::LazyPRMstar>(const ob::PlannerData& data)
224 {
225  return new og::LazyPRMstar(data);
226 };
227 } // namespace ompl_interface
228 
229 ompl_interface::PlanningContextManager::PlanningContextManager(moveit::core::RobotModelConstPtr robot_model,
230  constraint_samplers::ConstraintSamplerManagerPtr csm)
231  : robot_model_(std::move(robot_model))
232  , constraint_sampler_manager_(std::move(csm))
233  , max_goal_samples_(10)
234  , max_state_sampling_attempts_(4)
235  , max_goal_sampling_attempts_(1000)
236  , max_planning_threads_(4)
237  , max_solution_segment_length_(0.0)
238  , minimum_waypoint_count_(2)
239 {
240  cached_contexts_ = std::make_shared<CachedContexts>();
243 }
244 
246 
249 {
250  auto it = known_planners_.find(planner);
251  if (it != known_planners_.end())
252  return it->second;
253  else
254  {
255  ROS_ERROR_NAMED(LOGNAME, "Unknown planner: '%s'", planner.c_str());
257  }
258 }
259 
260 template <typename T>
262 {
263  registerPlannerAllocator(planner_id, [&](const ob::SpaceInformationPtr& si, const std::string& new_name,
265  return planner_allocator_.allocatePlanner<T>(si, new_name, spec);
266  });
267 }
268 
270 {
271  registerPlannerAllocatorHelper<og::AnytimePathShortening>("geometric::AnytimePathShortening");
272  registerPlannerAllocatorHelper<og::BFMT>("geometric::BFMT");
273  registerPlannerAllocatorHelper<og::BiEST>("geometric::BiEST");
274  registerPlannerAllocatorHelper<og::BiTRRT>("geometric::BiTRRT");
275  registerPlannerAllocatorHelper<og::BKPIECE1>("geometric::BKPIECE");
276  registerPlannerAllocatorHelper<og::EST>("geometric::EST");
277  registerPlannerAllocatorHelper<og::FMT>("geometric::FMT");
278  registerPlannerAllocatorHelper<og::KPIECE1>("geometric::KPIECE");
279  registerPlannerAllocatorHelper<og::LazyPRM>("geometric::LazyPRM");
280  registerPlannerAllocatorHelper<og::LazyPRMstar>("geometric::LazyPRMstar");
281  registerPlannerAllocatorHelper<og::LazyRRT>("geometric::LazyRRT");
282  registerPlannerAllocatorHelper<og::LBKPIECE1>("geometric::LBKPIECE");
283  registerPlannerAllocatorHelper<og::LBTRRT>("geometric::LBTRRT");
284  registerPlannerAllocatorHelper<og::PDST>("geometric::PDST");
285  registerPlannerAllocatorHelper<og::PRM>("geometric::PRM");
286  registerPlannerAllocatorHelper<og::PRMstar>("geometric::PRMstar");
287  registerPlannerAllocatorHelper<og::ProjEST>("geometric::ProjEST");
288  registerPlannerAllocatorHelper<og::RRT>("geometric::RRT");
289  registerPlannerAllocatorHelper<og::RRTConnect>("geometric::RRTConnect");
290  registerPlannerAllocatorHelper<og::RRTstar>("geometric::RRTstar");
291  registerPlannerAllocatorHelper<og::SBL>("geometric::SBL");
292  registerPlannerAllocatorHelper<og::SPARS>("geometric::SPARS");
293  registerPlannerAllocatorHelper<og::SPARStwo>("geometric::SPARStwo");
294  registerPlannerAllocatorHelper<og::STRIDE>("geometric::STRIDE");
295  registerPlannerAllocatorHelper<og::TRRT>("geometric::TRRT");
296  registerPlannerAllocatorHelper<og::AITstar>("geometric::AITstar");
297  registerPlannerAllocatorHelper<og::ABITstar>("geometric::ABITstar");
298  registerPlannerAllocatorHelper<og::BITstar>("geometric::BITstar");
299 }
300 
302 {
303  registerStateSpaceFactory(ModelBasedStateSpaceFactoryPtr(new JointModelStateSpaceFactory()));
304  registerStateSpaceFactory(ModelBasedStateSpaceFactoryPtr(new PoseModelStateSpaceFactory()));
305 }
306 
308 {
309  return [this](const std::string& planner) { return plannerSelector(planner); };
310 }
311 
314 {
315  planner_configs_ = pconfig;
316 }
317 
318 ompl_interface::ModelBasedPlanningContextPtr ompl_interface::PlanningContextManager::getPlanningContext(
319  const planning_interface::PlannerConfigurationSettings& config, const ModelBasedStateSpaceFactoryPtr& factory) const
320 {
321  // Check for a cached planning context
322  ModelBasedPlanningContextPtr context;
323 
324  {
325  std::unique_lock<std::mutex> slock(cached_contexts_->lock_);
326  auto cached_contexts = cached_contexts_->contexts_.find(std::make_pair(config.name, factory->getType()));
327  if (cached_contexts != cached_contexts_->contexts_.end())
328  {
329  for (const ModelBasedPlanningContextPtr& cached_context : cached_contexts->second)
330  if (cached_context.unique())
331  {
332  ROS_DEBUG_NAMED(LOGNAME, "Reusing cached planning context");
333  context = cached_context;
334  break;
335  }
336  }
337  }
338 
339  // Create a new planning context
340  if (!context)
341  {
342  ModelBasedStateSpaceSpecification space_spec(robot_model_, config.group);
344  context_spec.config_ = config.config;
345  context_spec.planner_selector_ = getPlannerSelector();
346  context_spec.constraint_sampler_manager_ = constraint_sampler_manager_;
347  context_spec.state_space_ = factory->getNewStateSpace(space_spec);
348 
349  // Choose the correct simple setup type to load
350  context_spec.ompl_simple_setup_ = std::make_shared<ompl::geometric::SimpleSetup>(context_spec.state_space_);
351 
352  ROS_DEBUG_NAMED(LOGNAME, "Creating new planning context");
353  context = std::make_shared<ModelBasedPlanningContext>(config.name, context_spec);
354  {
355  std::unique_lock<std::mutex> slock(cached_contexts_->lock_);
356  cached_contexts_->contexts_[std::make_pair(config.name, factory->getType())].push_back(context);
357  }
358  }
359 
360  context->setMaximumPlanningThreads(max_planning_threads_);
361  context->setMaximumGoalSamples(max_goal_samples_);
362  context->setMaximumStateSamplingAttempts(max_state_sampling_attempts_);
363  context->setMaximumGoalSamplingAttempts(max_goal_sampling_attempts_);
364  if (max_solution_segment_length_ > std::numeric_limits<double>::epsilon())
365  context->setMaximumSolutionSegmentLength(max_solution_segment_length_);
366  context->setMinimumWaypointCount(minimum_waypoint_count_);
367 
368  context->setSpecificationConfig(config.config);
369 
370  return context;
371 }
372 
373 const ompl_interface::ModelBasedStateSpaceFactoryPtr&
375 {
376  auto f = factory_type.empty() ? state_space_factories_.begin() : state_space_factories_.find(factory_type);
377  if (f != state_space_factories_.end())
378  return f->second;
379  else
380  {
381  ROS_ERROR_NAMED(LOGNAME, "Factory of type '%s' was not found", factory_type.c_str());
382  static const ModelBasedStateSpaceFactoryPtr EMPTY;
383  return EMPTY;
384  }
385 }
386 
387 const ompl_interface::ModelBasedStateSpaceFactoryPtr&
389  const moveit_msgs::MotionPlanRequest& req) const
390 {
391  // find the problem representation to use
392  auto best = state_space_factories_.end();
393  int prev_priority = 0;
394  for (auto it = state_space_factories_.begin(); it != state_space_factories_.end(); ++it)
395  {
396  int priority = it->second->canRepresentProblem(group, req, robot_model_);
397  if (priority > prev_priority)
398  {
399  best = it;
400  prev_priority = priority;
401  }
402  }
403 
404  if (best == state_space_factories_.end())
405  {
406  ROS_ERROR_NAMED(LOGNAME, "There are no known state spaces that can represent the given planning "
407  "problem");
408  static const ModelBasedStateSpaceFactoryPtr EMPTY;
409  return EMPTY;
410  }
411  else
412  {
413  ROS_DEBUG_NAMED(LOGNAME, "Using '%s' parameterization for solving problem", best->first.c_str());
414  return best->second;
415  }
416 }
417 
418 ompl_interface::ModelBasedPlanningContextPtr ompl_interface::PlanningContextManager::getPlanningContext(
419  const planning_scene::PlanningSceneConstPtr& planning_scene, const moveit_msgs::MotionPlanRequest& req,
420  moveit_msgs::MoveItErrorCodes& error_code, const ros::NodeHandle& nh, bool use_constraints_approximation) const
421 {
422  if (req.group_name.empty())
423  {
424  ROS_ERROR_NAMED(LOGNAME, "No group specified to plan for");
425  error_code.val = moveit_msgs::MoveItErrorCodes::INVALID_GROUP_NAME;
426  return ModelBasedPlanningContextPtr();
427  }
428 
429  error_code.val = moveit_msgs::MoveItErrorCodes::FAILURE;
430 
431  if (!planning_scene)
432  {
433  ROS_ERROR_NAMED(LOGNAME, "No planning scene supplied as input");
434  return ModelBasedPlanningContextPtr();
435  }
436 
437  // identify the correct planning configuration
438  auto pc = planner_configs_.end();
439  if (!req.planner_id.empty())
440  {
441  pc = planner_configs_.find(req.planner_id.find(req.group_name) == std::string::npos ?
442  req.group_name + "[" + req.planner_id + "]" :
443  req.planner_id);
444  if (pc == planner_configs_.end())
446  "Cannot find planning configuration for group '%s' using planner '%s'. Will use defaults instead.",
447  req.group_name.c_str(), req.planner_id.c_str());
448  }
449 
450  if (pc == planner_configs_.end())
451  {
452  pc = planner_configs_.find(req.group_name);
453  if (pc == planner_configs_.end())
454  {
455  ROS_ERROR_NAMED(LOGNAME, "Cannot find planning configuration for group '%s'", req.group_name.c_str());
456  return ModelBasedPlanningContextPtr();
457  }
458  }
459 
460  // Check if sampling in JointModelStateSpace is enforced for this group by user.
461  // This is done by setting 'enforce_joint_model_state_space' to 'true' for the desired group in ompl_planning.yaml.
462  //
463  // Some planning problems like orientation path constraints are represented in PoseModelStateSpace and sampled via IK.
464  // However consecutive IK solutions are not checked for proximity at the moment and sometimes happen to be flipped,
465  // leading to invalid trajectories. This workaround lets the user prevent this problem by forcing rejection sampling
466  // in JointModelStateSpace.
467  //
468  // Additionally, check if the requested planner is of the informed planner family (AITstar, ABITstar, BITstar) that
469  // does not support PoseModelStateSpace. If yes, force planning with JointModelStateSpace.
470  ModelBasedStateSpaceFactoryPtr factory;
471  auto it = pc->second.config.find("enforce_joint_model_state_space");
472 
473  auto type_it = pc->second.config.find("type");
474  std::string planner_type;
475  if (type_it != pc->second.config.end())
476  planner_type = type_it->second;
477 
478  if (it != pc->second.config.end() && boost::lexical_cast<bool>(it->second))
479  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
480  else if (planner_type == "geometric::AITstar")
481  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
482  else if (planner_type == "geometric::ABITstar")
483  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
484  else if (planner_type == "geometric::BITstar")
485  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
486  else
487  factory = getStateSpaceFactory(pc->second.group, req);
488 
489  ModelBasedPlanningContextPtr context = getPlanningContext(pc->second, factory);
490 
491  if (context)
492  {
493  context->clear();
494 
495  moveit::core::RobotStatePtr start_state = planning_scene->getCurrentStateUpdated(req.start_state);
496 
497  // Setup the context
498  context->setPlanningScene(planning_scene);
499  context->setMotionPlanRequest(req);
500  context->setCompleteInitialState(*start_state);
501 
502  context->setPlanningVolume(req.workspace_parameters);
503  if (!context->setPathConstraints(req.path_constraints, &error_code))
504  return ModelBasedPlanningContextPtr();
505 
506  if (!context->setGoalConstraints(req.goal_constraints, req.path_constraints, &error_code))
507  return ModelBasedPlanningContextPtr();
508 
509  try
510  {
511  context->configure(nh, use_constraints_approximation);
512  ROS_DEBUG_NAMED(LOGNAME, "%s: New planning context is set.", context->getName().c_str());
513  error_code.val = moveit_msgs::MoveItErrorCodes::SUCCESS;
514  }
515  catch (ompl::Exception& ex)
516  {
517  ROS_ERROR_NAMED(LOGNAME, "OMPL encountered an error: %s", ex.what());
518  context.reset();
519  }
520  }
521 
522  return context;
523 }
ompl_interface::MultiQueryPlannerAllocator::~MultiQueryPlannerAllocator
~MultiQueryPlannerAllocator()
Definition: planning_context_manager.cpp:94
ompl_interface::PlanningContextManager::getStateSpaceFactory
const ModelBasedStateSpaceFactoryPtr & getStateSpaceFactory(const std::string &factory_type) const
Definition: planning_context_manager.cpp:374
ompl_interface::PlanningContextManager::registerDefaultStateSpaces
void registerDefaultStateSpaces()
Definition: planning_context_manager.cpp:301
ompl_interface::MultiQueryPlannerAllocator::allocatePersistentPlanner
ob::Planner * allocatePersistentPlanner(const ob::PlannerData &data)
ompl_interface::ModelBasedStateSpaceSpecification
Definition: model_based_state_space.h:84
ompl_interface
The MoveIt interface to OMPL.
Definition: constrained_goal_sampler.h:46
ompl_interface::ModelBasedPlanningContextSpecification::constraint_sampler_manager_
constraint_samplers::ConstraintSamplerManagerPtr constraint_sampler_manager_
Definition: model_based_planning_context.h:99
ompl_interface::JointModelStateSpace::PARAMETERIZATION_TYPE
static const std::string PARAMETERIZATION_TYPE
Definition: joint_model_state_space.h:110
ROS_ERROR_NAMED
#define ROS_ERROR_NAMED(name,...)
ompl_interface::PoseModelStateSpaceFactory
Definition: pose_model_state_space_factory.h:75
ompl_interface::PlanningContextManager::CachedContexts::lock_
std::mutex lock_
Definition: planning_context_manager.cpp:89
planning_interface::PlannerConfigurationMap
std::map< std::string, PlannerConfigurationSettings > PlannerConfigurationMap
planning_interface::PlannerConfigurationSettings::name
std::string name
f
f
ompl_interface::PlanningContextManager::cached_contexts_
CachedContextsPtr cached_contexts_
Definition: planning_context_manager.h:298
ompl_interface::ModelBasedPlanningContextSpecification::ompl_simple_setup_
og::SimpleSetupPtr ompl_simple_setup_
Definition: model_based_planning_context.h:102
ompl_interface::PlanningContextManager::setPlannerConfigurations
void setPlannerConfigurations(const planning_interface::PlannerConfigurationMap &pconfig)
Specify configurations for the planners.
Definition: planning_context_manager.cpp:312
ompl_interface::ConfiguredPlannerSelector
std::function< ConfiguredPlannerAllocator(const std::string &planner_type)> ConfiguredPlannerSelector
Definition: model_based_planning_context.h:93
ompl_interface::MultiQueryPlannerAllocator::allocatePlanner
ob::PlannerPtr allocatePlanner(const ob::SpaceInformationPtr &si, const std::string &new_name, const ModelBasedPlanningContextSpecification &spec)
ompl_interface::MultiQueryPlannerAllocator::allocatePlannerImpl
ob::PlannerPtr allocatePlannerImpl(const ob::SpaceInformationPtr &si, const std::string &new_name, const ModelBasedPlanningContextSpecification &spec, bool load_planner_data=false, bool store_planner_data=false, const std::string &file_path="")
joint_model_state_space.h
ompl_interface::PlanningContextManager::getPlanningContext
ModelBasedPlanningContextPtr getPlanningContext(const planning_scene::PlanningSceneConstPtr &planning_scene, const planning_interface::MotionPlanRequest &req, moveit_msgs::MoveItErrorCodes &error_code, const ros::NodeHandle &nh, bool use_constraints_approximations) const
Returns a planning context to OMPLInterface, which in turn passes it to OMPLPlannerManager.
Definition: planning_context_manager.cpp:418
ompl_interface::JointModelStateSpaceFactory
Definition: joint_model_state_space_factory.h:75
ompl_interface::ModelBasedPlanningContextSpecification::planner_selector_
ConfiguredPlannerSelector planner_selector_
Definition: model_based_planning_context.h:98
ROS_DEBUG_NAMED
#define ROS_DEBUG_NAMED(name,...)
ompl_interface::LOGNAME
constexpr char LOGNAME[]
Definition: constrained_goal_sampler.cpp:78
planning_interface::PlannerConfigurationSettings::config
std::map< std::string, std::string > config
ompl_interface::PlanningContextManager::~PlanningContextManager
~PlanningContextManager()
ompl_interface::PlanningContextManager::PlanningContextManager
PlanningContextManager(moveit::core::RobotModelConstPtr robot_model, constraint_samplers::ConstraintSamplerManagerPtr csm)
Definition: planning_context_manager.cpp:229
ompl_interface::PlanningContextManager::plannerSelector
ConfiguredPlannerAllocator plannerSelector(const std::string &planner) const
Definition: planning_context_manager.cpp:248
ompl_interface::ModelBasedPlanningContextSpecification
Definition: model_based_planning_context.h:95
LOGNAME
constexpr char LOGNAME[]
Definition: generate_state_database.cpp:52
ompl_interface::PlanningContextManager::CachedContexts
Definition: planning_context_manager.cpp:86
planning_context_manager.h
ompl_interface::PlanningContextManager::getPlannerSelector
ConfiguredPlannerSelector getPlannerSelector() const
Definition: planning_context_manager.cpp:307
ompl_interface::ModelBasedPlanningContextSpecification::config_
std::map< std::string, std::string > config_
Definition: model_based_planning_context.h:97
std
ROS_WARN_NAMED
#define ROS_WARN_NAMED(name,...)
ompl_interface::ConfiguredPlannerAllocator
std::function< ob::PlannerPtr(const ompl::base::SpaceInformationPtr &si, const std::string &name, const ModelBasedPlanningContextSpecification &spec)> ConfiguredPlannerAllocator
Definition: model_based_planning_context.h:89
joint_model_state_space_factory.h
conversions.h
ompl_interface::PlanningContextManager::CachedContexts::contexts_
std::map< std::pair< std::string, std::string >, std::vector< ModelBasedPlanningContextPtr > > contexts_
Definition: planning_context_manager.cpp:88
pose_model_state_space_factory.h
planning_interface::PlannerConfigurationSettings
profiler.h
planning_interface::PlannerConfigurationSettings::group
std::string group
ompl_interface::PlanningContextManager::registerDefaultPlanners
void registerDefaultPlanners()
Definition: planning_context_manager.cpp:269
ROS_INFO
#define ROS_INFO(...)
planning_scene
ompl_interface::ModelBasedPlanningContextSpecification::state_space_
ModelBasedStateSpacePtr state_space_
Definition: model_based_planning_context.h:101
ros::NodeHandle
ompl_interface::PlanningContextManager::registerPlannerAllocatorHelper
void registerPlannerAllocatorHelper(const std::string &planner_id)
Definition: planning_context_manager.cpp:261


ompl
Author(s): Ioan Sucan
autogenerated on Tue Dec 24 2024 03:28:10