Robowflex  v0.1
Making MoveIt Easy
robowflex::PipelinePlanner Class Reference

A motion planner that uses the MoveIt! planning pipeline to load a planner plugin. More...

#include <planning.h>

+ Inheritance diagram for robowflex::PipelinePlanner:

Public Member Functions

 PipelinePlanner (const RobotPtr &robot, const std::string &name="")
 Constructor. More...
 
 PipelinePlanner (PipelinePlanner const &)=delete
 
void operator= (PipelinePlanner const &)=delete
 
planning_interface::MotionPlanResponse plan (const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) override
 Plan a motion given a request and a scene. Uses the planning pipeline's generatePlan() method, which goes through planning adapters. More...
 
template<typename T >
std::shared_ptr< T > extractPlanningContext (const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) const
 Retrieve planning context and dynamically cast to desired type from planning pipeline. More...
 
- Public Member Functions inherited from robowflex::Planner
 Planner (const RobotPtr &robot, const std::string &name="")
 Constructor. Takes in a robot description and an optional namespace name. If name is specified, planner parameters are namespaced under the namespace of robot. More...
 
 Planner (Planner const &)=delete
 
void operator= (Planner const &)=delete
 
virtual std::vector< std::stringgetPlannerConfigs () const =0
 Return all planner configurations offered by this planner. Any of the configurations returned can be set as the planner for a motion planning query sent to plan(). More...
 
virtual std::map< std::string, ProgressPropertygetProgressProperties (const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) const
 Retrieve the planner progress property map for this planner given a specific request. More...
 
const RobotPtr getRobot () const
 Return the robot for this planner. More...
 
const std::stringgetName () const
 Get the name of the planner. More...
 
virtual void preRun (const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request)
 This function is called before benchmarking. More...
 

Protected Attributes

planning_pipeline::PlanningPipelinePtr pipeline_
 Loaded planning pipeline plugin. More...
 
- Protected Attributes inherited from robowflex::Planner
RobotPtr robot_
 The robot to plan for. More...
 
IO::Handler handler_
 The parameter handler for the planner. More...
 
const std::string name_
 Namespace for the planner. More...
 

Additional Inherited Members

- Public Types inherited from robowflex::Planner
using ProgressProperty = std::function< std::string()>
 A function that returns the value of a planner property over the course of a run. More...
 

Detailed Description

A motion planner that uses the MoveIt! planning pipeline to load a planner plugin.

Definition at line 248 of file robowflex_library/include/robowflex_library/planning.h.

Constructor & Destructor Documentation

◆ PipelinePlanner() [1/2]

PipelinePlanner::PipelinePlanner ( const RobotPtr robot,
const std::string name = "" 
)

Constructor.

PipelinePlanner

Definition at line 253 of file robowflex_library/src/planning.cpp.

253  : Planner(robot, name)
254 {
255 }
Planner(const RobotPtr &robot, const std::string &name="")
Constructor. Takes in a robot description and an optional namespace name. If name is specified,...
Functions for loading and animating robots in Blender.

◆ PipelinePlanner() [2/2]

robowflex::PipelinePlanner::PipelinePlanner ( PipelinePlanner const &  )
delete

Member Function Documentation

◆ extractPlanningContext()

template<typename T >
std::shared_ptr<T> robowflex::PipelinePlanner::extractPlanningContext ( const SceneConstPtr scene,
const planning_interface::MotionPlanRequest request 
) const
inline

Retrieve planning context and dynamically cast to desired type from planning pipeline.

Parameters
[in]sceneA planning scene for the same robot_ to compute the plan in.
[in]requestThe motion planning request to solve.
Template Parameters
TType of underlying planning context.
Returns
The casted context for the motion planning request. On failure, nullptr.

Definition at line 275 of file robowflex_library/include/robowflex_library/planning.h.

277  {
278  if (not pipeline_)
279  return nullptr;
280 
281  auto pc = pipeline_->getPlannerManager()->getPlanningContext(scene->getSceneConst(), request);
282  return std::dynamic_pointer_cast<T>(pc);
283  }
planning_pipeline::PlanningPipelinePtr pipeline_
Loaded planning pipeline plugin.
Functions for loading and animating scenes in Blender.

◆ operator=()

void robowflex::PipelinePlanner::operator= ( PipelinePlanner const &  )
delete

◆ plan()

planning_interface::MotionPlanResponse PipelinePlanner::plan ( const SceneConstPtr scene,
const planning_interface::MotionPlanRequest request 
)
overridevirtual

Plan a motion given a request and a scene. Uses the planning pipeline's generatePlan() method, which goes through planning adapters.

Parameters
[in]sceneA planning scene for the same robot_ to compute the plan in.
[in]requestThe motion planning request to solve.
Returns
The motion planning response generated by the planner.

Implements robowflex::Planner.

Definition at line 258 of file robowflex_library/src/planning.cpp.

259 {
261  if (pipeline_)
262  pipeline_->generatePlan(scene->getSceneConst(), request, response);
263 
264  return response;
265 }

Member Data Documentation

◆ pipeline_

planning_pipeline::PlanningPipelinePtr robowflex::PipelinePlanner::pipeline_
protected

Loaded planning pipeline plugin.

Definition at line 286 of file robowflex_library/include/robowflex_library/planning.h.


The documentation for this class was generated from the following files: