PPL API 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 | |
MPTools * | GetMPTools () |
Input Accessors | |
MPProblem * | GetMPProblem () const noexcept |
void | SetMPProblem (MPProblem *const _problem) noexcept |
MPTask * | GetTask () const noexcept |
void | SetTask (MPTask *const _task) noexcept |
GroupTask * | GetGroupTask () const noexcept |
void | SetGroupTask (GroupTask *const _task) noexcept |
const std::string & | GetBaseFilename () const noexcept |
void | SetBaseFilename (const std::string &_s) noexcept |
Solution Accessors | |
MPSolution * | GetMPSolution () const noexcept |
void | SetMPSolution (MPSolution *_sol) noexcept |
RoadmapType * | GetRoadmap (Robot *const _r=nullptr) const noexcept |
GroupRoadmapType * | GetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept |
RoadmapType * | GetBlockRoadmap (Robot *const _r=nullptr) const noexcept |
Path * | GetPath (Robot *const _r=nullptr) const noexcept |
GroupPath * | GetGroupPath (RobotGroup *const _g=nullptr) const noexcept |
LocalObstacleMap * | GetLocalObstacleMap (Robot *const _r=nullptr) const noexcept |
GoalTracker * | GetGoalTracker () const noexcept |
StatClass * | GetStatClass () 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. | |
DistanceMetricSet * | m_distanceMetrics {nullptr} |
ValidityCheckerSet * | m_validityCheckers {nullptr} |
NeighborhoodFinderSet * | m_neighborhoodFinders {nullptr} |
SamplerSet * | m_samplers {nullptr} |
LocalPlannerSet * | m_localPlanners {nullptr} |
ExtenderSet * | m_extenders {nullptr} |
PathModifierSet * | m_pathModifiers {nullptr} |
ConnectorSet * | m_connectors {nullptr} |
MetricSet * | m_metrics {nullptr} |
MapEvaluatorSet * | m_mapEvaluators {nullptr} |
MPStrategySet * | m_mpStrategies {nullptr} |
A collection of planning algorithms that can operate on a specific MPProblem and MPTask.
void MPLibraryType< MPTraits >::ReadXMLFile | ( | const std::string & | _filename | ) |
Read an XML file to set the algorithms and parameters in this instance.
_filename | The XML file name. |
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).
_roadmap | The roadmap pointer. |
_source | The source VID. |
_target | The target VID. |
_posRes | The position resolution to use. |
_oriRes | The orientation resolution to use. |
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.
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.
void MPLibraryType< MPTraits >::Halt |
Halt the current strategy and move on to finalization. Useful for controlling the library from an external client object.
|
noexcept |
Set the current seed.
_seed | The seed value. |
void MPLibraryType< MPTraits >::AddSolver | ( | const std::string & | _label, |
long | _seed, | ||
const std::string & | _baseFileName, | ||
bool | _vizmoDebug = false |
||
) |
Add an input set to this MPLibrary.
_label | The MPStrategy label to use. |
_seed | The random seed to use. |
_baseFileName | The base name of the XML file to use. |
_vizmoDebug | Enable/disable vizmo debug. |
void MPLibraryType< MPTraits >::Solve | ( | MPProblem * | _problem, |
MPTask * | _task, | ||
MPSolution * | _solution | ||
) |
Run a single input (solver) and get back its solution.
_problem | The problem representation. |
_task | The task representation. |
_solution | The solution container, which may or may not already be populated. Existing solutions should be extended, not overwritten. |
void MPLibraryType< MPTraits >::Solve | ( | MPProblem * | _problem, |
MPTask * | _task | ||
) |
Run each input (solver) in sequence.
_problem | The problem representation. |
_task | The task representation. |
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.
_problem | The problem representation. |
_task | The task representation. |
_solution | The solution container, which may or may not already be populated. Existing solutions should be extended, not overwritten. |
_label | The label of the MPStrategy to call. |
_seed | The seed to use. |
_baseFilename | The base name for output files. |