PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members | Classes
MPLibraryType< MPTraits > Class Template Reference

Classes

struct  Solver
 

Public Member Functions

Construction
 MPLibraryType ()
 
 MPLibraryType (const std::string &_filename)
 
virtual ~MPLibraryType ()
 
Configuration
void ReadXMLFile (const std::string &_filename)
 
Distance Metric Accessors
DistanceMetricPointer GetDistanceMetric (const std::string &_l)
 
void AddDistanceMetric (DistanceMetricPointer _dm, const std::string &_l)
 
Validity Checker Accessors
ValidityCheckerPointer GetValidityChecker (const std::string &_l)
 
void AddValidityChecker (ValidityCheckerPointer _vc, const std::string &_l)
 
void ToggleValidity ()
 Toggle (negate) the validity output for ALL validity checkers.
 
Neighborhood Finder Accessors
NeighborhoodFinderPointer GetNeighborhoodFinder (const std::string &_l)
 
void AddNeighborhoodFinder (NeighborhoodFinderPointer _nf, const std::string &_l)
 
Sampler Accessors
const SamplerSet *const GetSamplers () const
 
SamplerPointer GetSampler (const std::string &_l)
 
void AddSampler (SamplerPointer _s, const std::string &_l)
 
Local Planner Accessors
LocalPlannerPointer GetLocalPlanner (const std::string &_l)
 
void AddLocalPlanner (LocalPlannerPointer _lp, const std::string &_l)
 
Extender Accessors
ExtenderPointer GetExtender (const std::string &_l)
 
void AddExtender (ExtenderPointer _mps, const std::string &_l)
 
Path Modifier Accessors
PathModifierPointer GetPathModifier (const std::string &_l)
 
void AddPathModifier (PathModifierPointer _ps, const std::string &_l)
 
Connector Accessors
ConnectorPointer GetConnector (const std::string &_l)
 
void AddConnector (ConnectorPointer _c, const std::string &_l)
 
Metric Accessors
MetricPointer GetMetric (const std::string &_l)
 
void AddMetric (MetricPointer _m, const std::string &_l)
 
Map Evaluator Accessors
MapEvaluatorPointer GetMapEvaluator (const std::string &_l)
 
void AddMapEvaluator (MapEvaluatorPointer _me, const std::string &_l)
 
MPStrategy Accessors
const MPStrategySet *const GetMPStrategies () const
 
MPStrategyPointer GetMPStrategy (const std::string &_l)
 
void AddMPStrategy (MPStrategyPointer _mps, const std::string &_l)
 
MPTools Accessors
MPToolsGetMPTools ()
 
Input Accessors
MPProblemGetMPProblem () const noexcept
 
void SetMPProblem (MPProblem *const _problem) noexcept
 
MPTaskGetTask () const noexcept
 
void SetTask (MPTask *const _task) noexcept
 
GroupTaskGetGroupTask () const noexcept
 
void SetGroupTask (GroupTask *const _task) noexcept
 
const std::string & GetBaseFilename () const noexcept
 
void SetBaseFilename (const std::string &_s) noexcept
 
Solution Accessors
MPSolutionGetMPSolution () const noexcept
 
void SetMPSolution (MPSolution *_sol) noexcept
 
RoadmapTypeGetRoadmap (Robot *const _r=nullptr) const noexcept
 
GroupRoadmapTypeGetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept
 
RoadmapTypeGetBlockRoadmap (Robot *const _r=nullptr) const noexcept
 
PathGetPath (Robot *const _r=nullptr) const noexcept
 
GroupPathGetGroupPath (RobotGroup *const _g=nullptr) const noexcept
 
LocalObstacleMapGetLocalObstacleMap (Robot *const _r=nullptr) const noexcept
 
GoalTrackerGetGoalTracker () const noexcept
 
StatClassGetStatClass () const noexcept
 
Edge Reconstruction
std::vector< typename RoadmapType::VP > ReconstructEdge (RoadmapType *const _roadmap, const VID _source, const VID _target, const double _posRes, const double _oriRes)
 
std::vector< typename GroupRoadmapType::VP > ReconstructEdge (GroupRoadmapType *const _roadmap, const VID _source, const VID _target, const double _posRes, const double _oriRes)
 
template<typename AbstractRoadmapType >
std::vector< typename AbstractRoadmapType::VP > ReconstructEdge (AbstractRoadmapType *const _roadmap, const VID _source, const VID _target)
 
Execution Interface
void Halt ()
 
bool IsRunning () const noexcept
 Check to see if the strategy should continue.
 
void SetSeed () const noexcept
 Set the current seed to match the first solver node.
 
void SetSeed (const long _seed) const noexcept
 
void AddSolver (const std::string &_label, long _seed, const std::string &_baseFileName, bool _vizmoDebug=false)
 
std::vector< std::string > GetSolverLabels ()
 
void Solve (MPProblem *_problem, MPTask *_task, MPSolution *_solution)
 
void Solve (MPProblem *_problem, MPTask *_task)
 
void Solve (MPProblem *_problem, GroupTask *_task)
 Group overload:
 
void Solve (MPProblem *_problem, GroupTask *_task, MPSolution *_solution)
 
void Solve (MPProblem *_problem, MPTask *_task, MPSolution *_solution, const std::string &_label, const long _seed, const std::string &_baseFilename)
 
Debugging
void Print (ostream &_os) const
 Print each method set.
 

Public Types

Motion Planning Types
typedef MPTraits::MPSolution MPSolution
 
typedef MPTraits::RoadmapType RoadmapType
 
typedef RoadmapType::VID VID
 
typedef MPTraits::CfgType CfgType
 
typedef MPTraits::GroupRoadmapType GroupRoadmapType
 
typedef MPTraits::Path Path
 
typedef MPTraits::GroupPathType GroupPath
 
typedef MPTraits::MPTools MPTools
 
typedef MPTraits::LocalObstacleMap LocalObstacleMap
 
typedef MPTraits::GoalTracker GoalTracker
 
Method Set Types
typedef MethodSet< MPTraits, DistanceMetricMethod< MPTraits > > DistanceMetricSet
 
typedef MethodSet< MPTraits, ValidityCheckerMethod< MPTraits > > ValidityCheckerSet
 
typedef MethodSet< MPTraits, NeighborhoodFinderMethod< MPTraits > > NeighborhoodFinderSet
 
typedef MethodSet< MPTraits, SamplerMethod< MPTraits > > SamplerSet
 
typedef MethodSet< MPTraits, LocalPlannerMethod< MPTraits > > LocalPlannerSet
 
typedef MethodSet< MPTraits, ExtenderMethod< MPTraits > > ExtenderSet
 
typedef MethodSet< MPTraits, PathModifierMethod< MPTraits > > PathModifierSet
 
typedef MethodSet< MPTraits, ConnectorMethod< MPTraits > > ConnectorSet
 
typedef MethodSet< MPTraits, MetricMethod< MPTraits > > MetricSet
 
typedef MethodSet< MPTraits, MapEvaluatorMethod< MPTraits > > MapEvaluatorSet
 
typedef MethodSet< MPTraits, MPStrategyMethod< MPTraits > > MPStrategySet
 
Method Pointer Types
typedef ValidityCheckerSet::MethodPointer ValidityCheckerPointer
 
typedef DistanceMetricSet::MethodPointer DistanceMetricPointer
 
typedef NeighborhoodFinderSet::MethodPointer NeighborhoodFinderPointer
 
typedef SamplerSet::MethodPointer SamplerPointer
 
typedef LocalPlannerSet::MethodPointer LocalPlannerPointer
 
typedef ExtenderSet::MethodPointer ExtenderPointer
 
typedef PathModifierSet::MethodPointer PathModifierPointer
 
typedef ConnectorSet::MethodPointer ConnectorPointer
 
typedef MetricSet::MethodPointer MetricPointer
 
typedef MapEvaluatorSet::MethodPointer MapEvaluatorPointer
 
typedef MPStrategySet::MethodPointer MPStrategyPointer
 

Protected Attributes

Method Sets

Method sets hold and offer access to the motion planning objects of the corresponding type.

DistanceMetricSetm_distanceMetrics {nullptr}
 
ValidityCheckerSetm_validityCheckers {nullptr}
 
NeighborhoodFinderSetm_neighborhoodFinders {nullptr}
 
SamplerSetm_samplers {nullptr}
 
LocalPlannerSetm_localPlanners {nullptr}
 
ExtenderSetm_extenders {nullptr}
 
PathModifierSetm_pathModifiers {nullptr}
 
ConnectorSetm_connectors {nullptr}
 
MetricSetm_metrics {nullptr}
 
MapEvaluatorSetm_mapEvaluators {nullptr}
 
MPStrategySetm_mpStrategies {nullptr}
 

Detailed Description

template<typename MPTraits>
class MPLibraryType< MPTraits >

A collection of planning algorithms that can operate on a specific MPProblem and MPTask.

Member Function Documentation

◆ ReadXMLFile()

template<typename MPTraits >
void MPLibraryType< MPTraits >::ReadXMLFile ( const std::string &  _filename)

Read an XML file to set the algorithms and parameters in this instance.

Parameters
_filenameThe XML file name.

◆ ReconstructEdge() [1/3]

template<typename MPTraits >
std::vector< typename MPTraits::RoadmapType::VP > MPLibraryType< MPTraits >::ReconstructEdge ( RoadmapType *const  _roadmap,
const VID  _source,
const VID  _target,
const double  _posRes,
const double  _oriRes 
)

Recompute a roadmap edge path at full resolution (source and target cfgs are not included).

Parameters
_roadmapThe roadmap pointer.
_sourceThe source VID.
_targetThe target VID.
_posResThe position resolution to use.
_oriResThe orientation resolution to use.
Returns
A vector of cfgs along the edge, spaced at resolution intervals.

◆ ReconstructEdge() [2/3]

template<typename MPTraits >
std::vector< typename MPTraits::GroupRoadmapType::VP > MPLibraryType< MPTraits >::ReconstructEdge ( GroupRoadmapType *const  _roadmap,
const VID  _source,
const VID  _target,
const double  _posRes,
const double  _oriRes 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ ReconstructEdge() [3/3]

template<typename MPTraits >
template<typename AbstractRoadmapType >
std::vector< typename AbstractRoadmapType::VP > MPLibraryType< MPTraits >::ReconstructEdge ( AbstractRoadmapType *const  _roadmap,
const VID  _source,
const VID  _target 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Halt()

template<typename MPTraits >
void MPLibraryType< MPTraits >::Halt

Halt the current strategy and move on to finalization. Useful for controlling the library from an external client object.

◆ SetSeed()

template<typename MPTraits >
void MPLibraryType< MPTraits >::SetSeed ( const long  _seed) const
noexcept

Set the current seed.

Parameters
_seedThe seed value.

◆ AddSolver()

template<typename MPTraits >
void MPLibraryType< MPTraits >::AddSolver ( const std::string &  _label,
long  _seed,
const std::string &  _baseFileName,
bool  _vizmoDebug = false 
)

Add an input set to this MPLibrary.

Parameters
_labelThe MPStrategy label to use.
_seedThe random seed to use.
_baseFileNameThe base name of the XML file to use.
_vizmoDebugEnable/disable vizmo debug.

◆ Solve() [1/3]

template<typename MPTraits >
void MPLibraryType< MPTraits >::Solve ( MPProblem _problem,
MPTask _task,
MPSolution _solution 
)

Run a single input (solver) and get back its solution.

Parameters
_problemThe problem representation.
_taskThe task representation.
_solutionThe solution container, which may or may not already be populated. Existing solutions should be extended, not overwritten.

◆ Solve() [2/3]

template<typename MPTraits >
void MPLibraryType< MPTraits >::Solve ( MPProblem _problem,
MPTask _task 
)

Run each input (solver) in sequence.

Parameters
_problemThe problem representation.
_taskThe task representation.

◆ Solve() [3/3]

template<typename MPTraits >
void MPLibraryType< MPTraits >::Solve ( MPProblem _problem,
MPTask _task,
MPSolution _solution,
const std::string &  _label,
const long  _seed,
const std::string &  _baseFilename 
)

Run a specific MPStrategy from the XML file with a designated seed and base output file name. This is intended for use with the simulator where agents may need to call various strategies within a single execution.

Parameters
_problemThe problem representation.
_taskThe task representation.
_solutionThe solution container, which may or may not already be populated. Existing solutions should be extended, not overwritten.
_labelThe label of the MPStrategy to call.
_seedThe seed to use.
_baseFilenameThe base name for output files.

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