Aikido
aikido::planner::ompl::OMPLConfigurationToConfigurationPlanner< PlannerType > Class Template Reference

Creates an OMPL Planner. More...

#include <aikido/planner/ompl/OMPLConfigurationToConfigurationPlanner.hpp>

Inheritance diagram for aikido::planner::ompl::OMPLConfigurationToConfigurationPlanner< PlannerType >:
aikido::planner::ConfigurationToConfigurationPlanner aikido::planner::SingleProblemPlanner< ConfigurationToConfigurationPlanner, ConfigurationToConfiguration > aikido::planner::Planner

Public Member Functions

 OMPLConfigurationToConfigurationPlanner (statespace::ConstStateSpacePtr stateSpace, common::RNG *rng=nullptr, statespace::ConstInterpolatorPtr interpolator=nullptr, distance::DistanceMetricPtr dmetric=nullptr, constraint::SampleablePtr sampler=nullptr, constraint::ConstTestablePtr boundsConstraint=nullptr, constraint::ProjectablePtr boundsProjector=nullptr, double maxDistanceBtwValidityChecks=0.1)
 Constructor. More...
 
trajectory::TrajectoryPtr plan (const SolvableProblem &problem, Result *result=nullptr) override
 Plans a trajectory from start state to goal state by using an interpolator to interpolate between them. More...
 
::ompl::base::PlannerPtr getOMPLPlanner ()
 Returns the underlying OMPL planner used. More...
 
- Public Member Functions inherited from aikido::planner::ConfigurationToConfigurationPlanner
 ConfigurationToConfigurationPlanner (statespace::ConstStateSpacePtr stateSpace, common::RNG *rng=nullptr)
 Constructs from a state space. More...
 
virtual trajectory::TrajectoryPtr plan (const SolvableProblem &problem, Result *result=nullptr)=0
 Solves problem returning the result to result. More...
 
trajectory::TrajectoryPtr plan (const Problem &problem, Result *result=nullptr) final override
 
- Public Member Functions inherited from aikido::planner::SingleProblemPlanner< ConfigurationToConfigurationPlanner, ConfigurationToConfiguration >
 SingleProblemPlanner (statespace::ConstStateSpacePtr stateSpace, common::RNG *rng=nullptr)
 
bool canSolve (const Problem &problem) const final override
 Returns true if this planner can solve problem. More...
 
trajectory::TrajectoryPtr plan (const Problem &problem, Result *result=nullptr) final override
 Solves problem returning the result to result. More...
 
- Public Member Functions inherited from aikido::planner::Planner
 Planner (statespace::ConstStateSpacePtr stateSpace, common::RNG *rng=nullptr)
 Constructs from a state space. More...
 
virtual ~Planner ()=default
 Default destructor. More...
 
statespace::ConstStateSpacePtr getStateSpace () const
 Returns const state space. More...
 
common::RNGgetRng ()
 Returns RNG. More...
 

Protected Attributes

::ompl::base::PlannerPtr mPlanner
 Pointer to the underlying OMPL Planner. More...
 
- Protected Attributes inherited from aikido::planner::Planner
statespace::ConstStateSpacePtr mStateSpace
 State space associated with this planner. More...
 
std::unique_ptr< common::RNGmRng
 RNG the planner uses. More...
 

Additional Inherited Members

- Public Types inherited from aikido::planner::SingleProblemPlanner< ConfigurationToConfigurationPlanner, ConfigurationToConfiguration >
using SolvableProblem = ConfigurationToConfiguration
 

Detailed Description

template<class PlannerType>
class aikido::planner::ompl::OMPLConfigurationToConfigurationPlanner< PlannerType >

Creates an OMPL Planner.

Template Parameters
PlannerTypeThe OMPL Planner to use.

Constructor & Destructor Documentation

◆ OMPLConfigurationToConfigurationPlanner()

template<class PlannerType >
aikido::planner::ompl::OMPLConfigurationToConfigurationPlanner< PlannerType >::OMPLConfigurationToConfigurationPlanner ( statespace::ConstStateSpacePtr  stateSpace,
common::RNG rng = nullptr,
statespace::ConstInterpolatorPtr  interpolator = nullptr,
distance::DistanceMetricPtr  dmetric = nullptr,
constraint::SampleablePtr  sampler = nullptr,
constraint::ConstTestablePtr  boundsConstraint = nullptr,
constraint::ProjectablePtr  boundsProjector = nullptr,
double  maxDistanceBtwValidityChecks = 0.1 
)

Constructor.

Parameters
[in]stateSpaceState space that this planner associated with.
[in]rngRandom number generator to create the state sampler.
[in]interpolatorInterpolator used to interpolate between two states. GeodesicInterpolator is used by default.
[in]dmetricA valid distance metric defined on the StateSpace. Distance metric relevant to the statespace is used by default.
[in]samplerA Sampleable to sample states from StateSpace.
Note
OMPL planners assume this sampler samples from the statespace uniformly. Care must be taken when using a non-uniform sampler.
Parameters
[in]boundsConstraintA constraint used to determine whether states encountered during planning fall within any bounds specified on the StateSpace. In addition to the validityConstraint, this must also be satisfied for a state to be considered valid.
[in]boundsProjectorA Projectable that projects a state back within valid bounds defined on the StateSpace.
[in]maxDistanceBtwValidityChecksThe maximum distance (under dmetric) between validity checking two successive points on a tree extension or an edge in a graph.

Member Function Documentation

◆ getOMPLPlanner()

template<class PlannerType >
ompl::base::PlannerPtr aikido::planner::ompl::OMPLConfigurationToConfigurationPlanner< PlannerType >::getOMPLPlanner

Returns the underlying OMPL planner used.

◆ plan()

template<class PlannerType >
trajectory::TrajectoryPtr aikido::planner::ompl::OMPLConfigurationToConfigurationPlanner< PlannerType >::plan ( const SolvableProblem problem,
Result result = nullptr 
)
override

Plans a trajectory from start state to goal state by using an interpolator to interpolate between them.

If successful, the planner returns a trajectory that satisfies the constraint. If not, it returns a nullptr. The corresponding message is stored in result.

Parameters
[in]problemPlanning problem.
[out]resultInformation about success or failure.
Returns
Trajectory or nullptr if planning failed.
Exceptions
Ifproblem is not ConfigurationToConfiguration.
Ifresult is not ConfigurationToConfiguration::Result.

Member Data Documentation

◆ mPlanner

template<class PlannerType >
::ompl::base::PlannerPtr aikido::planner::ompl::OMPLConfigurationToConfigurationPlanner< PlannerType >::mPlanner
protected

Pointer to the underlying OMPL Planner.