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 // TODO: remove when ROS Melodic and older are no longer supported
73 #if OMPL_VERSION_VALUE >= 1005000
74 #include <ompl/geometric/planners/informedtrees/AITstar.h>
75 #include <ompl/geometric/planners/informedtrees/ABITstar.h>
76 #include <ompl/geometric/planners/informedtrees/BITstar.h>
77 #endif
78 
82 
83 using namespace std::placeholders;
84 
85 namespace ompl_interface
86 {
87 constexpr char LOGNAME[] = "planning_context_manager";
88 
90 {
91  std::map<std::pair<std::string, std::string>, std::vector<ModelBasedPlanningContextPtr> > contexts_;
92  std::mutex lock_;
93 };
94 
95 } // namespace ompl_interface
96 
98 {
99  // Store all planner data
100  for (const auto& entry : planner_data_storage_paths_)
101  {
102  ROS_INFO("Storing planner data");
103  ob::PlannerData data(planners_[entry.first]->getSpaceInformation());
104  planners_[entry.first]->getPlannerData(data);
105  storage_.store(data, entry.second.c_str());
106  }
107 }
108 
109 template <typename T>
111  const ob::SpaceInformationPtr& si, const std::string& new_name, const ModelBasedPlanningContextSpecification& spec)
112 {
113  // Store planner instance if multi-query planning is enabled
114  auto cfg = spec.config_;
115  auto it = cfg.find("multi_query_planning_enabled");
116  bool multi_query_planning_enabled = false;
117  if (it != cfg.end())
118  {
119  multi_query_planning_enabled = boost::lexical_cast<bool>(it->second);
120  cfg.erase(it);
121  }
122  if (multi_query_planning_enabled)
123  {
124  // If we already have an instance, use that one
125  auto planner_map_it = planners_.find(new_name);
126  if (planner_map_it != planners_.end())
127  return planner_map_it->second;
128 
129  // Certain multi-query planners allow loading and storing the generated planner data. This feature can be
130  // selectively enabled for loading and storing using the bool parameters 'load_planner_data' and
131  // 'store_planner_data'. The storage file path is set using the parameter 'planner_data_path'.
132  // File read and write access are handled by the PlannerDataStorage class. If the file path is invalid
133  // an error message is printed and the planner is constructed/destructed with default values.
134  it = cfg.find("load_planner_data");
135  bool load_planner_data = false;
136  if (it != cfg.end())
137  {
138  load_planner_data = boost::lexical_cast<bool>(it->second);
139  cfg.erase(it);
140  }
141  it = cfg.find("store_planner_data");
142  bool store_planner_data = false;
143  if (it != cfg.end())
144  {
145  store_planner_data = boost::lexical_cast<bool>(it->second);
146  cfg.erase(it);
147  }
148  it = cfg.find("planner_data_path");
149  std::string planner_data_path;
150  if (it != cfg.end())
151  {
152  planner_data_path = it->second;
153  cfg.erase(it);
154  }
155  // Store planner instance for multi-query use
156  planners_[new_name] =
157  allocatePlannerImpl<T>(si, new_name, spec, load_planner_data, store_planner_data, planner_data_path);
158  return planners_[new_name];
159  }
160  else
161  {
162  // Return single-shot planner instance
163  return allocatePlannerImpl<T>(si, new_name, spec);
164  }
165 }
166 
167 template <typename T>
169  const ob::SpaceInformationPtr& si, const std::string& new_name, const ModelBasedPlanningContextSpecification& spec,
170  bool load_planner_data, bool store_planner_data, const std::string& file_path)
171 {
172  ob::PlannerPtr planner;
173  // Try to initialize planner with loaded planner data
174  if (load_planner_data)
175  {
176  ROS_INFO("Loading planner data");
177  ob::PlannerData data(si);
178  storage_.load(file_path.c_str(), data);
179  planner = std::shared_ptr<ob::Planner>{ allocatePersistentPlanner<T>(data) };
180  if (!planner)
182  "Creating a '%s' planner from persistent data is not supported. Going to create a new instance.",
183  new_name.c_str());
184  }
185  if (!planner)
186  planner = std::make_shared<T>(si);
187  if (!new_name.empty())
188  planner->setName(new_name);
189  planner->params().setParams(spec.config_, true);
190  // Remember which planner instances to store when the destructor is called
191  if (store_planner_data)
192  planner_data_storage_paths_[new_name] = file_path;
193  return planner;
194 }
195 
196 // default implementation
197 template <typename T>
198 inline ompl::base::Planner*
200 {
201  return nullptr;
202 };
203 // TODO: remove when ROS Melodic and older are no longer supported
204 // namespace is scoped instead of global because of GCC bug 56480
205 #if OMPL_VERSION_VALUE >= 1005000
206 namespace ompl_interface
207 {
208 template <>
209 inline ompl::base::Planner*
210 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::PRM>(const ob::PlannerData& data)
211 {
212  return new og::PRM(data);
213 };
214 template <>
215 inline ompl::base::Planner*
216 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::PRMstar>(const ob::PlannerData& data)
217 {
218  return new og::PRMstar(data);
219 };
220 template <>
221 inline ompl::base::Planner*
222 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::LazyPRM>(const ob::PlannerData& data)
223 {
224  return new og::LazyPRM(data);
225 };
226 template <>
227 inline ompl::base::Planner*
228 MultiQueryPlannerAllocator::allocatePersistentPlanner<ompl::geometric::LazyPRMstar>(const ob::PlannerData& data)
229 {
230  return new og::LazyPRMstar(data);
231 };
232 } // namespace ompl_interface
233 #endif
234 
235 ompl_interface::PlanningContextManager::PlanningContextManager(moveit::core::RobotModelConstPtr robot_model,
236  constraint_samplers::ConstraintSamplerManagerPtr csm)
237  : robot_model_(std::move(robot_model))
238  , constraint_sampler_manager_(std::move(csm))
239  , max_goal_samples_(10)
240  , max_state_sampling_attempts_(4)
241  , max_goal_sampling_attempts_(1000)
242  , max_planning_threads_(4)
243  , max_solution_segment_length_(0.0)
244  , minimum_waypoint_count_(2)
245 {
246  cached_contexts_ = std::make_shared<CachedContexts>();
249 }
250 
252 
255 {
256  auto it = known_planners_.find(planner);
257  if (it != known_planners_.end())
258  return it->second;
259  else
260  {
261  ROS_ERROR_NAMED(LOGNAME, "Unknown planner: '%s'", planner.c_str());
263  }
264 }
265 
266 template <typename T>
268 {
269  registerPlannerAllocator(planner_id, [&](const ob::SpaceInformationPtr& si, const std::string& new_name,
271  return planner_allocator_.allocatePlanner<T>(si, new_name, spec);
272  });
273 }
274 
276 {
277  registerPlannerAllocatorHelper<og::AnytimePathShortening>("geometric::AnytimePathShortening");
278  registerPlannerAllocatorHelper<og::BFMT>("geometric::BFMT");
279  registerPlannerAllocatorHelper<og::BiEST>("geometric::BiEST");
280  registerPlannerAllocatorHelper<og::BiTRRT>("geometric::BiTRRT");
281  registerPlannerAllocatorHelper<og::BKPIECE1>("geometric::BKPIECE");
282  registerPlannerAllocatorHelper<og::EST>("geometric::EST");
283  registerPlannerAllocatorHelper<og::FMT>("geometric::FMT");
284  registerPlannerAllocatorHelper<og::KPIECE1>("geometric::KPIECE");
285  registerPlannerAllocatorHelper<og::LazyPRM>("geometric::LazyPRM");
286  registerPlannerAllocatorHelper<og::LazyPRMstar>("geometric::LazyPRMstar");
287  registerPlannerAllocatorHelper<og::LazyRRT>("geometric::LazyRRT");
288  registerPlannerAllocatorHelper<og::LBKPIECE1>("geometric::LBKPIECE");
289  registerPlannerAllocatorHelper<og::LBTRRT>("geometric::LBTRRT");
290  registerPlannerAllocatorHelper<og::PDST>("geometric::PDST");
291  registerPlannerAllocatorHelper<og::PRM>("geometric::PRM");
292  registerPlannerAllocatorHelper<og::PRMstar>("geometric::PRMstar");
293  registerPlannerAllocatorHelper<og::ProjEST>("geometric::ProjEST");
294  registerPlannerAllocatorHelper<og::RRT>("geometric::RRT");
295  registerPlannerAllocatorHelper<og::RRTConnect>("geometric::RRTConnect");
296  registerPlannerAllocatorHelper<og::RRTstar>("geometric::RRTstar");
297  registerPlannerAllocatorHelper<og::SBL>("geometric::SBL");
298  registerPlannerAllocatorHelper<og::SPARS>("geometric::SPARS");
299  registerPlannerAllocatorHelper<og::SPARStwo>("geometric::SPARStwo");
300  registerPlannerAllocatorHelper<og::STRIDE>("geometric::STRIDE");
301  registerPlannerAllocatorHelper<og::TRRT>("geometric::TRRT");
302 // TODO: remove when ROS Melodic and older are no longer supported
303 #if OMPL_VERSION_VALUE >= 1005000
304  registerPlannerAllocatorHelper<og::AITstar>("geometric::AITstar");
305  registerPlannerAllocatorHelper<og::ABITstar>("geometric::ABITstar");
306  registerPlannerAllocatorHelper<og::BITstar>("geometric::BITstar");
307 #endif
308 }
309 
311 {
312  registerStateSpaceFactory(ModelBasedStateSpaceFactoryPtr(new JointModelStateSpaceFactory()));
313  registerStateSpaceFactory(ModelBasedStateSpaceFactoryPtr(new PoseModelStateSpaceFactory()));
314 }
315 
317 {
318  return [this](const std::string& planner) { return plannerSelector(planner); };
319 }
320 
323 {
324  planner_configs_ = pconfig;
325 }
326 
327 ompl_interface::ModelBasedPlanningContextPtr ompl_interface::PlanningContextManager::getPlanningContext(
328  const planning_interface::PlannerConfigurationSettings& config, const ModelBasedStateSpaceFactoryPtr& factory) const
329 {
330  // Check for a cached planning context
331  ModelBasedPlanningContextPtr context;
332 
333  {
334  std::unique_lock<std::mutex> slock(cached_contexts_->lock_);
335  auto cached_contexts = cached_contexts_->contexts_.find(std::make_pair(config.name, factory->getType()));
336  if (cached_contexts != cached_contexts_->contexts_.end())
337  {
338  for (const ModelBasedPlanningContextPtr& cached_context : cached_contexts->second)
339  if (cached_context.unique())
340  {
341  ROS_DEBUG_NAMED(LOGNAME, "Reusing cached planning context");
342  context = cached_context;
343  break;
344  }
345  }
346  }
347 
348  // Create a new planning context
349  if (!context)
350  {
351  ModelBasedStateSpaceSpecification space_spec(robot_model_, config.group);
353  context_spec.config_ = config.config;
354  context_spec.planner_selector_ = getPlannerSelector();
355  context_spec.constraint_sampler_manager_ = constraint_sampler_manager_;
356  context_spec.state_space_ = factory->getNewStateSpace(space_spec);
357 
358  // Choose the correct simple setup type to load
359  context_spec.ompl_simple_setup_ = std::make_shared<ompl::geometric::SimpleSetup>(context_spec.state_space_);
360 
361  ROS_DEBUG_NAMED(LOGNAME, "Creating new planning context");
362  context = std::make_shared<ModelBasedPlanningContext>(config.name, context_spec);
363  {
364  std::unique_lock<std::mutex> slock(cached_contexts_->lock_);
365  cached_contexts_->contexts_[std::make_pair(config.name, factory->getType())].push_back(context);
366  }
367  }
368 
369  context->setMaximumPlanningThreads(max_planning_threads_);
370  context->setMaximumGoalSamples(max_goal_samples_);
371  context->setMaximumStateSamplingAttempts(max_state_sampling_attempts_);
372  context->setMaximumGoalSamplingAttempts(max_goal_sampling_attempts_);
373  if (max_solution_segment_length_ > std::numeric_limits<double>::epsilon())
374  context->setMaximumSolutionSegmentLength(max_solution_segment_length_);
375  context->setMinimumWaypointCount(minimum_waypoint_count_);
376 
377  context->setSpecificationConfig(config.config);
378 
379  return context;
380 }
381 
382 const ompl_interface::ModelBasedStateSpaceFactoryPtr&
384 {
385  auto f = factory_type.empty() ? state_space_factories_.begin() : state_space_factories_.find(factory_type);
386  if (f != state_space_factories_.end())
387  return f->second;
388  else
389  {
390  ROS_ERROR_NAMED(LOGNAME, "Factory of type '%s' was not found", factory_type.c_str());
391  static const ModelBasedStateSpaceFactoryPtr EMPTY;
392  return EMPTY;
393  }
394 }
395 
396 const ompl_interface::ModelBasedStateSpaceFactoryPtr&
398  const moveit_msgs::MotionPlanRequest& req) const
399 {
400  // find the problem representation to use
401  auto best = state_space_factories_.end();
402  int prev_priority = 0;
403  for (auto it = state_space_factories_.begin(); it != state_space_factories_.end(); ++it)
404  {
405  int priority = it->second->canRepresentProblem(group, req, robot_model_);
406  if (priority > prev_priority)
407  {
408  best = it;
409  prev_priority = priority;
410  }
411  }
412 
413  if (best == state_space_factories_.end())
414  {
415  ROS_ERROR_NAMED(LOGNAME, "There are no known state spaces that can represent the given planning "
416  "problem");
417  static const ModelBasedStateSpaceFactoryPtr EMPTY;
418  return EMPTY;
419  }
420  else
421  {
422  ROS_DEBUG_NAMED(LOGNAME, "Using '%s' parameterization for solving problem", best->first.c_str());
423  return best->second;
424  }
425 }
426 
427 ompl_interface::ModelBasedPlanningContextPtr ompl_interface::PlanningContextManager::getPlanningContext(
428  const planning_scene::PlanningSceneConstPtr& planning_scene, const moveit_msgs::MotionPlanRequest& req,
429  moveit_msgs::MoveItErrorCodes& error_code, const ros::NodeHandle& nh, bool use_constraints_approximation) const
430 {
431  if (req.group_name.empty())
432  {
433  ROS_ERROR_NAMED(LOGNAME, "No group specified to plan for");
434  error_code.val = moveit_msgs::MoveItErrorCodes::INVALID_GROUP_NAME;
435  return ModelBasedPlanningContextPtr();
436  }
437 
438  error_code.val = moveit_msgs::MoveItErrorCodes::FAILURE;
439 
440  if (!planning_scene)
441  {
442  ROS_ERROR_NAMED(LOGNAME, "No planning scene supplied as input");
443  return ModelBasedPlanningContextPtr();
444  }
445 
446  // identify the correct planning configuration
447  auto pc = planner_configs_.end();
448  if (!req.planner_id.empty())
449  {
450  pc = planner_configs_.find(req.planner_id.find(req.group_name) == std::string::npos ?
451  req.group_name + "[" + req.planner_id + "]" :
452  req.planner_id);
453  if (pc == planner_configs_.end())
455  "Cannot find planning configuration for group '%s' using planner '%s'. Will use defaults instead.",
456  req.group_name.c_str(), req.planner_id.c_str());
457  }
458 
459  if (pc == planner_configs_.end())
460  {
461  pc = planner_configs_.find(req.group_name);
462  if (pc == planner_configs_.end())
463  {
464  ROS_ERROR_NAMED(LOGNAME, "Cannot find planning configuration for group '%s'", req.group_name.c_str());
465  return ModelBasedPlanningContextPtr();
466  }
467  }
468 
469  // Check if sampling in JointModelStateSpace is enforced for this group by user.
470  // This is done by setting 'enforce_joint_model_state_space' to 'true' for the desired group in ompl_planning.yaml.
471  //
472  // Some planning problems like orientation path constraints are represented in PoseModelStateSpace and sampled via IK.
473  // However consecutive IK solutions are not checked for proximity at the moment and sometimes happen to be flipped,
474  // leading to invalid trajectories. This workaround lets the user prevent this problem by forcing rejection sampling
475  // in JointModelStateSpace.
476  //
477  // Additionally, check if the requested planner is of the informed planner family (AITstar, ABITstar, BITstar) that
478  // does not support PoseModelStateSpace. If yes, force planning with JointModelStateSpace.
479  ModelBasedStateSpaceFactoryPtr factory;
480  auto it = pc->second.config.find("enforce_joint_model_state_space");
481 
482  auto type_it = pc->second.config.find("type");
483  std::string planner_type;
484  if (type_it != pc->second.config.end())
485  planner_type = type_it->second;
486 
487  if (it != pc->second.config.end() && boost::lexical_cast<bool>(it->second))
488  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
489  else if (planner_type == "geometric::AITstar")
490  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
491  else if (planner_type == "geometric::ABITstar")
492  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
493  else if (planner_type == "geometric::BITstar")
494  factory = getStateSpaceFactory(JointModelStateSpace::PARAMETERIZATION_TYPE);
495  else
496  factory = getStateSpaceFactory(pc->second.group, req);
497 
498  ModelBasedPlanningContextPtr context = getPlanningContext(pc->second, factory);
499 
500  if (context)
501  {
502  context->clear();
503 
504  moveit::core::RobotStatePtr start_state = planning_scene->getCurrentStateUpdated(req.start_state);
505 
506  // Setup the context
507  context->setPlanningScene(planning_scene);
508  context->setMotionPlanRequest(req);
509  context->setCompleteInitialState(*start_state);
510 
511  context->setPlanningVolume(req.workspace_parameters);
512  if (!context->setPathConstraints(req.path_constraints, &error_code))
513  return ModelBasedPlanningContextPtr();
514 
515  if (!context->setGoalConstraints(req.goal_constraints, req.path_constraints, &error_code))
516  return ModelBasedPlanningContextPtr();
517 
518  try
519  {
520  context->configure(nh, use_constraints_approximation);
521  ROS_DEBUG_NAMED(LOGNAME, "%s: New planning context is set.", context->getName().c_str());
522  error_code.val = moveit_msgs::MoveItErrorCodes::SUCCESS;
523  }
524  catch (ompl::Exception& ex)
525  {
526  ROS_ERROR_NAMED(LOGNAME, "OMPL encountered an error: %s", ex.what());
527  context.reset();
528  }
529  }
530 
531  return context;
532 }
ompl_interface::MultiQueryPlannerAllocator::~MultiQueryPlannerAllocator
~MultiQueryPlannerAllocator()
Definition: planning_context_manager.cpp:97
ompl_interface::PlanningContextManager::getStateSpaceFactory
const ModelBasedStateSpaceFactoryPtr & getStateSpaceFactory(const std::string &factory_type) const
Definition: planning_context_manager.cpp:383
ompl_interface::PlanningContextManager::registerDefaultStateSpaces
void registerDefaultStateSpaces()
Definition: planning_context_manager.cpp:310
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:92
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:321
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:427
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:235
ompl_interface::PlanningContextManager::plannerSelector
ConfiguredPlannerAllocator plannerSelector(const std::string &planner) const
Definition: planning_context_manager.cpp:254
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:89
planning_context_manager.h
ompl_interface::PlanningContextManager::getPlannerSelector
ConfiguredPlannerSelector getPlannerSelector() const
Definition: planning_context_manager.cpp:316
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:91
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:275
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:267


ompl
Author(s): Ioan Sucan
autogenerated on Fri May 3 2024 02:29:39